Android JVM 修改 heap 大小

Gradle

Add the following lines to project build.gradle

android {
    dexOptions {
        javaMaxHeapSize "1g" 
    }
}  

Ant

set ANT_OPTS=-Xmx1024m

Misc

Alt none Alt none

ref: R1 R2