Could not reserve enough heap space when building .apk

I’ve just downloaded the latest version of Solar2d and tried to generate an.apk for the Hello World Sample app.

The build is failing with the following:

Process command line: C:\Program Files (x86)\Corona Labs\Corona\jre\bin\java.exe -Xmx1G -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\Norman\.gradle\wrapper\dists\gradle-6.5.1-all\cdund22i8guosqylfo49op4dv\gradle-6.5.1\lib\gradle-launcher-6.5.1.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.5.1
10:17:14.011  Please read the following process output to find out more:
10:17:14.011  -----------------------
10:17:14.011  Error occurred during initialization of VM
10:17:14.011  **Could not reserve enough space for 1048576KB object heap**
10:17:14.011  Picked up JAVA_TOOL_OPTIONS: -Duser.language=en

I’m running Windows. This same Windows machine was able to build an .apk file about a year ago without issue.

I only have 8GB RAM on my Windows. I know it’s not much these days but could this be the problem?

And is it possible to change the -Xmx1G Java option above?

Check that you don’t have a 1GB file in your project folder.

I have this, and more, problems. I just recently compiled an Android app for the Google Play store. A few days later I decided to compile the same app for the Amazon store.

I get this heap error message… it appears that the compile process wants to include a very large folder that I have excluded in the excludedFiles section of build.settings.

When I remove that folder entirely (drag-drop to another location), I get a “Build Error #1 - Error while fetching plugins”.

This has been going on for about a week. No changes to the app since I successfully created an Android version a week ago.

I am sorry to say… the amount of troubleshooting to get a compiled app lately is beyond frustrating. I spend a lot of time uninstalling/reinstalling Solar2D, commenting out plugins in my app, etc. in the hopes that it will work. I think I may have updated Solar2D between the successful and unsuccessful compiles (now using the latest version). but I’ve done this so many times, I am just no sure anymore.

New build is in works which should fix this issue. If it still continues, try rebooting computer. 1gb of memory is barely enough for Android builds :frowning: