Page 1 of 1

Android Build Failed (for version 7.2.2)

Posted: Mon Jun 03, 2019 7:45 am
by jahzz07
May I ask how to solve this problem? I can't build the android app of my visual novel. Thank you!


Ren'Py 7.2.2.491

Updating project.

Creating assets directory.

Packaging internal data.

I'm using Gradle to build the package.
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.4/userguide/g ... aemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 3145728KB object heap


* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Re: Android Build Failed (for version 7.2.2)

Posted: Mon Jun 03, 2019 7:50 am
by SypherZent
When this happened to me, it was because I had many assets packaged in the game's files.
Let me explain...

You have your actual game's folder with name of the game. Inside the folder, there is a folder called game, that has all of your scripts and assets.
You need to make sure the actual game's folder (with the name of the game) only has the game folder in it and no other assets.

When building your game, Ren'Py launcher will take all assets from your Game's folder (not the one called game, the one that it is in).

In my case, my game directory is 'RenPy Projects/MV Heroes/game'
I had over 2GB of assets inside of the 'RenPy Projects/MV Heroes folder'
This was causing Android build to fail, because Java uses a Stack/Heap memory configuration to store all of the assets and it was exceeding the limits of the heap.

See if it is the case for you. Possibly you have all non-final assets in your game folder as I did, and the build is trying to include it all.

Hope it helps.

Re: Android Build Failed (for version 7.2.2)

Posted: Mon Jun 03, 2019 8:19 am
by jahzz07
SypherZent wrote:
Mon Jun 03, 2019 7:50 am
When this happened to me, it was because I had many assets packaged in the game's files.
Let me explain...

You have your actual game's folder with name of the game. Inside the folder, there is a folder called game, that has all of your scripts and assets.
You need to make sure the actual game's folder (with the name of the game) only has the game folder in it and no other assets.

When building your game, Ren'Py launcher will take all assets from your Game's folder (not the one called game, the one that it is in).

In my case, my game directory is 'RenPy Projects/MV Heroes/game'
I had over 2GB of assets inside of the 'RenPy Projects/MV Heroes folder'
This was causing Android build to fail, because Java uses a Stack/Heap memory configuration to store all of the assets and it was exceeding the limits of the heap.

See if it is the case for you. Possibly you have all non-final assets in your game folder as I did, and the build is trying to include it all.

Hope it helps.
I tried to delete the non-final assets but the same note still appeared. :(
My files are only 116 MB for this VN.