Android Build Failure

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
georgewbush
Newbie
Posts: 13
Joined: Fri Nov 30, 2018 5:14 pm
Contact:

Android Build Failure

#1 Post by georgewbush »

Hi, I'm trying to build an Android release distribution but it keeps failing on me. I have installed the SDK and created keys and also configured it. When I click on Build It begins and about 2-3 minutes later while Gradle is working I get this error:

Expiring Daemon because JVM Tenured space is exhausted
Daemon will be stopped at the end of the build after running out of JVM memory
Expiring Daemon because JVM Tenured space is exhausted

FAILURE: Build failed with an exception.

* What went wrong:
Gradle build daemon has been stopped: JVM garbage collector thrashing and after running out of JVM memory

* 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.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3784
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Android Build Failure

#2 Post by Imperf3kt »

A typical error that began cropping up with Ren'Py 7

The fix is to download and install a 64bit version of the JDK version 8
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

georgewbush
Newbie
Posts: 13
Joined: Fri Nov 30, 2018 5:14 pm
Contact:

Re: Android Build Failure

#3 Post by georgewbush »

I had JDK 8 already but went ahead and re-installed it but failure continues.

I'm able to build it if I select under Expansion APK "Yes, 2GB size limit" but the build fails if i select "No size limit of 100MB on google play"


Expiring Daemon because JVM Tenured space is exhausted
Daemon will be stopped at the end of the build after running out of JVM memory
Expiring Daemon because JVM Tenured space is exhausted
:app:packageRelease FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageRelease'.
> org.gradle.tooling.BuildException (no error message)

* 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.

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3784
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Android Build Failure

#4 Post by Imperf3kt »

In that case it's probably a missing gradle.properties file
See here for instrictions
viewtopic.php?f=8&t=53352#p502805
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

georgewbush
Newbie
Posts: 13
Joined: Fri Nov 30, 2018 5:14 pm
Contact:

Re: Android Build Failure

#5 Post by georgewbush »

Hi thanks for your help so far.

I don't have that folder in there even when I view hidden files and folders.

If I need to create it what should the file type be?

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3784
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: Android Build Failure

#6 Post by Imperf3kt »

gradle.properties is everything needed when naming the file.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

georgewbush
Newbie
Posts: 13
Joined: Fri Nov 30, 2018 5:14 pm
Contact:

Re: Android Build Failure

#7 Post by georgewbush »

Thank you! It worked!

rames44
Veteran
Posts: 233
Joined: Sun May 29, 2016 4:38 pm
Contact:

Re: Android Build Failure

#8 Post by rames44 »

Just so people know what’s going on here, Gradle runs using Java. When the Java Virtual Machine (JVM) starts up, it has a “don’t ever use more than this amount of memory” setting. In this case, the default setting was too low, and the process was running out of memory. The gradle.porperties file mentioned in the linked post sets default properties for Gradle when it runs. The fourth line in the example file sets the Gradle JVM startup properties. The argument -Xmx3g tells the JVM that it’s allowed to use up to 3 gigabytes of memory, which, in this case, was more than the default, and enough to let the process complete. (For most versions of Java 8, the default value is 1/4th of your RAM, or 1gb, whichever is smaller, so 3gb is a lot more than the default.)

User avatar
Johan
Regular
Posts: 76
Joined: Mon Jan 14, 2019 5:58 pm
Organization: DMEOW
itch: dmeow
Location: Perú
Discord: Johan#7444
Contact:

Re: Android Build Failure

#9 Post by Johan »

ohmygod, thanks for explaining the process behind the solution bc i didn't understand haha. I like when I understand WHY it worked. thanks!
dmeow !
Check my silly blog!

◤ And I saw the stars ★ falling down... ◢
Check the game!! IT'S OUT!!!
.

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot]