简体   繁体   中英

How to turn off proguard completely?

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?

set this

minifyEnabled false

in your app build.gradle

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

  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
    debug/release(as per your need) {
        minifyEnabled false
        useProguard false

    }

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM