JVM space exhausted when building a project through gradle
24,893
This means the JVM doesn't have enough memory to compile the Java files. There's a couple of steps that can be taken.
- Run
./gradlew clean
, which will remove everything including leftovers from previous builds which are no longer relevant. - Run
./gradlew --stop
, killing other gradle daemons which may be taking up memory. - Allocate more memory. This can be done by adding the following to the
gradle.properties
file.
org.gradle.jvmargs=-Xms128m -Xmx1024m -XX:+CMSClassUnloadingEnabled
![Rob Blinsinger](https://i.stack.imgur.com/5L32G.jpg?s=256&g=1)
Comments
-
Rob Blinsinger over 4 years
Receiving error message when building a project through gradle
Expiring Daemon because JVM Tenured space is exhausted