Please help I am new to android development I am building an android app but it gets decompile by show java app very easily I tried some other app to decompile but show java app couldn't decompile them. So my question is how to add this type of security in my app too??
Asked
Active
Viewed 1,124 times
2 Answers
1
Take a look at the ProGuard tool, it's an utility to obfuscate the code: it's still possible to do reverse engineering but it's much harder. It's also included in the Android sdk.

SimoV8
- 1,382
- 1
- 18
- 32
1
Well android studio uses proguard by default so you can add this line in your gradle file to make it both optimized and hard to decompile. As a result your apk will also be smaller size.
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

rockfight
- 1,916
- 2
- 20
- 31
-
I tried it before but didn't work I think something to add in progaurd-rules.pro file but don't know what?? – axboy Aug 12 '15 at 06:32
-
you only have to add classes to keep in proguardr-rules.pro. Are you sure you added minifyEnabled true while compiling ? – rockfight Aug 12 '15 at 06:34
-
Yes I am sure but in rule file default is added – axboy Aug 12 '15 at 06:36
-
can you please tell me what to add in progaurd-rules.pro file – axboy Aug 12 '15 at 06:39
-
you only need to add the classes that may be stripped by proguard but usually it is empty. Adding things there won't do anything to make apk de-compilation harder. – rockfight Aug 12 '15 at 09:06