JVM space exhausted when building a project through gradle
Asked Answered
V

1

33

Receiving error message when building a project through gradle

Expiring Daemon because JVM Tenured space is exhausted

Vancevancleave answered 19/12, 2018 at 15:19 Comment(0)
V
74

This means the JVM doesn't have enough memory to compile the Java files. There's a couple of steps that can be taken.

  1. Run ./gradlew clean, which will remove everything including leftovers from previous builds which are no longer relevant.
  2. Run ./gradlew --stop, killing other gradle daemons which may be taking up memory.
  3. Allocate more memory. This can be done by adding the following to the gradle.properties file.

org.gradle.jvmargs=-Xms128m -Xmx1024m -XX:+CMSClassUnloadingEnabled

Vancevancleave answered 19/12, 2018 at 15:25 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.