How to turn off only the obfuscation in Android R8?

norbDEV picture norbDEV · Aug 15, 2018 · Viewed 11.6k times · Source

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

minifyEnabled true
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

Does't work.


Edit:

@JakeWharton: "You use ProGuard configurations for this, not a Gradle DSL. Disable shrinking with -dontshrink, disable obfuscation with -dontobfuscate, and disable optimization with -dontoptimize."

TLDL

proguard-rules.pro

-dontshrink
-dontobfuscate
-dontoptimize

Answer

Bharath picture Bharath · Apr 19, 2019

In your gradle.properties file, add this line

 android.enableR8=false

This worked for me.