robotchaoX
|
9578a603e8
|
Increase the JVM heap size for Gradle
[Why]
The Java Virtual Machine(JVM) maximum heap size(-Xmx) is 512M by default. It will occur out of memory eror when compiling for Android.
Android compiling error: "java.lang.OutOfMemoryError: Java heap space".
[How]
Configure JVM memory for Gradle by setting Gradle property org.gradle.jvmargs in gradle.properties file.
This gradle.properties file was generated by Android Studio settings.
Reference:
https://developer.android.com/build/optimize-your-build?utm_source=android-studio#increase-the-jvm-heap-size
https://docs.gradle.org/7.2/userguide/build_environment.html#sec:configuring_jvm_memory
|
2023-05-29 16:48:27 +08:00 |
|