Vikrant Singh Vikrant Singh - 1 year ago 96
Android Question

Increasing the gradle heap size

Whenever I try to make the build of the app , gradle takes too much of time and there comes a message showing that you should increase the Gradle size to 3072 MB , currently it is 910 MB . so my question is how can I increase the heap memory of gradle ??

Answer Source

Just add

 android {
 dexOptions {
    // Prevent OutOfMemory with MultiDex during the build phase
    javaMaxHeapSize "4g"

in your build.gradle file

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download