Ren'Py Build Android version (Ren'Py) failed

the66

beware, the germans are cumming
Modder
Donor
Respected User
Jan 27, 2017
7,793
24,340
Expiring Daemon because JVM Tenured space is exhausted
Daemon will be stopped at the end of the build after running out of JVM memory
just read this page from the 1st post onwards.
 
  • Like
Reactions: berkaslan

the66

beware, the germans are cumming
Modder
Donor
Respected User
Jan 27, 2017
7,793
24,340
what do you want to achieve with android.enableAapt2=false?
i never needed this setting nor did i use it once.
you basically try to disable AAPT2, but it's a fundamental prerequisite to create an Android package.
 

the66

beware, the germans are cumming
Modder
Donor
Respected User
Jan 27, 2017
7,793
24,340
maybe you should try a fresh Ren'Py installation with a fresh Android SDK.
and try not to delete temporary files created by Gradle.
 

Rich

Old Fart
Modder
Donor
Respected User
Game Developer
Jun 25, 2017
2,554
7,333
help
Build Android version (Ren'Py) failed
This is a really common problem.

This is an "out of memory" error, as you can see towards the end of the exception trace. The problem is that the default settings that Ren'py uses to configure Gradle (the build tool for Android) don't reserve enough memory for larger games to be built.

The amount of memory Gradle is allowed to use is configured in a file called "gradle.properties". There are two copies under your renpy-xxx-sdk/rapt folder, one in rapt/project and one in rapt/prototype. I think if you update the one in rapt/prototype, it gets copied to rapt/project, but update both to be certain.

What you'll find in there is a line something like:
Code:
org.gradle.jvmargs=-Xmx3g
Basically, if the line reads like that, it limits Gradle to using 3 gigabytes of memory, which usually isn't enough. (The -Xmx part is the option defining "maximum Java heap memory", and the "3g" part is how much.

I modified mine to
Code:
org.gradle.jvmargs=-Xmx8g
to give it 8 gigabytes, which seems to work for me. (Of course, that assumes you HAVE more than 8 gig on your system. I have 32g, so an 8g process is doable) In any event, you need to kick up this number until it works.
 

berkaslan

Newbie
Feb 1, 2020
17
1
[QUOTE = "Zengin, gönderi: 3193912, üye: 83870"]
Sana yardım edemediğim. Ren'py forumlarına göndermenizi öneririz.
[/ALINTI]
: Ağla: okey thanks
 

Thepiselove

Newbie
Nov 21, 2019
16
6
Hi everyone, I am also having problems with ren'py to compile apk. I have a computer with 8gb of ram and I added "8" on gradle.properties as suggested in the previous messages. I installed java etc several times ... but today, after an automatic update of the computer, it is giving me this further message already at the beginning of the compilation. How can I solve it?

(Ciao a tutti, anche io sto avendo problemi con ren'py per compilare apk. Ho un computer con 8gb di ram ed ho aggiunto "8" su gradle.properties come suggerito nei messaggi precedenti. Ho installato più volte java ecc... ma oggi, dopo un aggiornamento automatico del computer, mi sta dando questo ulteriore messaggio già ad inizio compilazione. Come posso risolvere?)

02.PNG
 

Raylight

New Member
Jun 23, 2020
1
0
add the line org.gradle.jvmargs=-Xmx3g in gradle.properties to allocate 3gb memory for your java vm.
Hey I am new to this thing so where can I put that code?
Sorry if you think this is a stupid question but I don't really know where can I put that code
 

GraphicusRex

Member
Game Developer
Mar 6, 2020
485
830
Holy shit... Yeah, this issue was hell for me. Thank you Rich for pointing out to change it in both rapt/prototype and rapt/project, because in my case it definitely wasn't copying over automatically on my machine. Finally got a working test version together, and hopefully I can release my next version in a day or two!
 
  • Like
Reactions: LunarBit

Ixalon

Member
Modder
Donor
Compressor
Jan 22, 2020
112
553
Hi All,

I had a ton of out of memory issues when trying to port some of the larger games to Android. I even gave the heap 32g memory at one point and it still failed with out of memory without even coming close to using all of that. I finally figured out that I needed to extract all the elements form the rpa files and delete the rpas. This has allowed me to port modded versions of almost every game I have come across, so hopefully this will help some people get past that.

I am now running into a new error with one game. I have attached the error in case anyone can point me in the right direction. Thanks! View attachment android.txt

Edit: Just going to answer myself since I got it working. I downloaded a skunked version of the game and the build was successful. So I guess perhaps the files were too large uncompressed? Regardless, I am happy that I am now able to build my own android ports.

A question for the66 or other android porters, are there guidelines for posting ports of games regarding hosting or getting game developer consent? I know there are port requests out there and now that I can do them myself I would love to give back to the community but I don't want to step on any landmines. Any tips would be appreciated.
 
Last edited:

Ixalon

Member
Modder
Donor
Compressor
Jan 22, 2020
112
553
Hello, is it possible to build games larger than 2GB ? I get a weird integer too larger error...
Make sure to extract and delete the RPA files prior to building. I recommend using compressed versions of the game or compressing them yourself using cruncher prior to building. The other thing you may want to verify is that you are using the 64-bit version of Java. Those are the main issues I ran into when building. HTH

Ix
 

MilfMaster90

Member
Sep 26, 2017
440
2,164
Make sure to extract and delete the RPA files prior to building. I recommend using compressed versions of the game or compressing them yourself using cruncher prior to building. The other thing you may want to verify is that you are using the 64-bit version of Java. Those are the main issues I ran into when building. HTH

Ix
6GB APKs build correctly but don't work on my device. Anything under 2GB works fine. Small APK + OBB extension also doesn't work on larger than 2GB projects, for some reason renpy only builds main.obb and doesn't know how to create patch.obb extensions automatically. I'm not intrested in compression methods, I tried and they work but quality loss is significant and very noticeable on my 12inch tablet.