5

I have an Android application on which I don't want to do anything regarding optimization/obfuscation/etc.

I deleted the (auto-generated) proguard configuration file (proguard.cfg) but I think my library projects' files are still being obfuscated, because in the crash reports I don't see the line numbers - Unknown Source is shown instead.

How can I turn off proguard completely?

Also, how can I validate that it was indeed turned off?

AlikElzin-kilaka
  • 34,335
  • 35
  • 194
  • 277

4 Answers4

6

set this

minifyEnabled false

in your app build.gradle

https://stackoverflow.com/a/39051307/2002079

Community
  • 1
  • 1
ahmadalibaloch
  • 5,851
  • 2
  • 50
  • 59
2
  1. In your project folder create or edit proguard.cfg
  2. Add this to proguard.cfg -dontoptimize -dontshrink -dontusemixedcaseclassnames -dontskipnonpubliclibraryclasses -dontpreverify -verbose

  3. Add to project.properties this:

proguard.config=proguard.cfg

  1. form console run: ant clean ant release
1
    debug/release(as per your need) {
        minifyEnabled false
        useProguard false

    }
priojeet priyom
  • 899
  • 9
  • 17
  • 1
    This is WRONG. `useProguard false` does not disable obfuscation; it changes the obfuscation engine from ProGuard to R8. See the docs for `useProguard` for more info. – Andrew Sun Apr 21 '19 at 17:53
-2

UPDATE : DISABLING THE USE PROGUARD NOW ENABLES R8 CODE SHRINKER BY DEFAULT .

  1. minifyEnabled is code shrinker

    1. shrinkResources is resource shrinker (works only when minifyEnabled true)
    2. useProguard is code obfuscator
    3. You can use minifyEnabled true with useProguard false

    So, for completely disabling the proguard features do :

minifyEnabled false useProguard false

ArpitA
  • 721
  • 7
  • 17