Getting warning about memory usage with Android Studio Gradle. Tried adding line to gradle.properties: still get warning


(Andy Triboletti) #1

I have a project at /Users/andytriboletti/lolcats-android.

In it I have a file gradle.properties with the line:
org.gradle.jvmargs=-Xmx5120M

I see this warning:
To run dex in process, the Gradle daemon needs a larger heap.
It currently has approximately 4551 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to more than 5120 MB.
To do this set org.gradle.jvmargs=-Xmx5120M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html

I have also tried gradle.properties in /Users/andytriboletti/gradle.properties
and gradle.properties in /Users/andytriboletti/.gradle/gradle.properties.

It’s like this with any Android Studio Gradle Project