Maheshwar Ligade
Feb 5, 2017 · 2 min read
  1. The obfuscated code makes your APK difficult to reverse engineer, which is especially valuable when your app uses security-sensitive features, such as licensing verification.
  1. enables the proguard minifyEnabled true
  2. enable shrinkResources true to reduce the APK size by shrinking resources.
  3. proguardFiles getDefaultProguardFile('proguard-android.txt') to enable the default one. If you want to use your own proguard file then use the below rules.
buildTypes {
release {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}

debug {
debuggable true
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

If you enjoyed this article, please don’t forget to Clap.

For more stories.

Let's connect on Stackoverflow, LinkedIn, Facebook& Twitter.

Maheshwar Ligade

Written by

Learner, Full Stack Developer, StackOverflower, OpenSource Contributor Curious of #ML,#DL,#AI. Reach me maheshwar.ligade@gmail.com

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade