[Android] Gradle build daemon disappeared unexpectedly
by Riley MacDonald, December 25, 2017

While configuring the continuous integration server for my Intoxication Calculator Android Application I experienced the following error:

> Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)

The machine hosting my Jenkins / CI is not a high end machine. I considered it might be running low on memory. I discovered it’s not ideal to run gradle as a daemon on CI servers. I also wanted to increase the amount of memory allotted for the gradle instance. I added the following to my build script (local.properties file) to resolve the issue:

echo "org.gradle.jvmargs=-Xmx1024m" >> local.properties

I also added the --no-daemon argument to my ./gradlew command. This appears to have resolved the disappearing issue I was experiencing.

Open the comment form

Leave a comment:

Comments will be reviewed before they are posted.

User Comments:

prashant on 2019-08-31 12:04:19 said:
ERROR: Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)