Posted on 30th August 2016 7:14pm Android Studio suggests adding org.gradle.jvmargs=-Xmx1536M to gradle.properties file

Running Android Studio 2.2 (beta) we came across the following advisory in the Gradle Console …

To run dex in process, the Gradle daemon needs a larger heap.
It currently has 1024 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to at least 1536 MB.
To do this set org.gradle.jvmargs=-Xmx1536M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html

As we were using a new build of Android Studio we didnt have a gradle.properties file, so we created one in the ‘root’ directory of the Android project with one line in it …

org.gradle.jvmargs=-Xmx1536M

Compiling the Project no longer displays the above message, whether compilation is faster is debatable !!!

One more comment … if you are adding additional settings, make sure that the jvmargs is the last property set

«