Difference between debug and release apks Difference between debug and release apks android android

Difference between debug and release apks


Major differences are the debug flag and the signing keys:

  • For debug builds the apk will be signed with the default debug signing keys with debug flag enabled.

  • For release keys you will have to explicitly specify the keys to sign with and the debug flag will be turned off so that it cannot be debugged.

  • Proguard can be turned on for release builds. (also for debug builds but not advised). This step needs to be done explicitly and is false by default.

Note: these things can be altered in your build.config and you can choose what ever permutation and combination you wish.


One important difference is that release APKs typically have had ProGuard (code shrinking) run on them, which detects and removes unused code to reduce the APK size.

From Shrink Your Code and Resources:

Be aware that code shrinking slows down the build time, so you should avoid using it on your debug build if possible. However, it's important that you do enable code shrinking on your final APK used for testing, because it might introduce bugs if you do not sufficiently customize which code to keep.

Your colleagues are probably testing on the debug build type to save time, because it can take significantly longer to build the release APK as opposed to the debug APK.


The all above answers are correct BUT the major difference is that if we use the debug.apk to install the app on the device/emulator we can

*Debug it with debuuger

*Profile the cpu, memory, network with android studio profiler

*See the logs in the logcat

*Debug the layout with layout inspector

if use release.apk we can't use the above features, and we configure some features/libraries to work in specific out put type (Like we can use leakCanary only in debug apk)