Expiring Daemon because JVM heap space is exhausted

This can be fixed by increasing the configured max heap size for the project.

Through IDE:

Add the below lines into the gradle.properties file. Below memory size can be configured based on the RAM availability

org.gradle.daemon=true
org.gradle.jvmargs=-Xmx2560m

Through GUI:

In the Settings, search for ‘Memory Settings’ and increase the IDE max heap size and Daemon max heap size as per the system RAM availability.

Leave a Comment