Expiring Daemon because JVM heap space is exhausted

前端 未结 3 995
轮回少年
轮回少年 2020-12-23 15:39

I just updated the Android Studio to 3.5 Beta 1 and I\'m getting

Expiring Daemon because JVM heap space is exhausted

message wh

3条回答
  •  旧巷少年郎
    2020-12-23 16:31

    I was able to solve this for my React Native project by configuring the following:

    // gradle.properties
    org.gradle.daemon=true
    org.gradle.configureondemand=true
    org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=2048m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
    

    and

    // app/build.gradle
    android {
        dexOptions {
           javaMaxHeapSize "3g"
        }
    }
    

提交回复
热议问题