How to make Proguard obfuscate using Android Studio

Question!

ProGuard is not doing a very complete job of obfuscating my Android project. When I decompile my apk at decompileandroid.com I see that it is only changing the name of local temporary variables and nothing else. It is not changing class names, variable names, method names, or anything else.

After reading the manual all of the optional commands seem to be telling it NOT to do something so I am left to think it should obfuscate everything by default.

my build.gradle has the following...

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}

Neither of those two files exist is the project. The project is as it was converted from Eclipse by Android Studio.

What am I missing. Do I need to create those two files and put some proguard parameters in them - if so what. I want maximum obfuscation. Thanks, Dean



Answers

Set minifyEnabled true in order to turn on code shrinking, and then shrinkResources true to turn on resource shrinking.

Reference for the quote



This video can help you solving your question :)
By: admin