GC overhead limit exceeded when enable R8 Shrinker in Android Studio 3.4

后端 未结 1 1917
后悔当初
后悔当初 2021-02-07 01:10

I\'m using Android Studio 3.4 (Canary 9), when I build my app, it failed with the following error

Task :app:transformClassesAndResourcesWithR8ForDebug

相关标签:
1条回答
  • 2021-02-07 02:07

    As you said you are not using any custom JVM args, try it out.

    In your gradle.properties file try several values for memory settings. For example try to set

    org.gradle.jvmargs=-Xmx4096m
    

    As suggested by the commented section:

    Specifies the JVM arguments used for the daemon process.

    The setting is particularly useful for tweaking memory settings.

    org.gradle.jvmargs=-Xmx1536m

    I've used R8 in my project and all worked fine.

    0 讨论(0)
提交回复
热议问题