How to turn off only the obfuscation in Android R8?

后端 未结 2 1804
梦如初夏
梦如初夏 2020-12-09 09:45

I use Android Studio 3.3 Canary 5, Gradle 4.9, gradle plugin 3.3.0-alpha05

minifyEnabled true
useProguard false
proguardFiles getDefaultProguardFile(\'progua         


        
相关标签:
2条回答
  • 2020-12-09 10:23

    In your gradle.properties file, add this line

     android.enableR8=false
    

    This worked for me.

    0 讨论(0)
  • 2020-12-09 10:39

    Following this answer, I was able to solve this issue. Instead of editing the build.gradle file, I added -dontobfuscate to the proguard-rules.pro file. (You can configure a different proguard rules file for debug and release builds.) This skipped the obfuscation step and allowed me to make shrink'd debug builds with R8.

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