Difference between debug and release apks

user2454516 picture user2454516 · Aug 10, 2016 · Viewed 34.9k times · Source

I am new to android as well as android studio. From my experience in visual studio, when we test the .exe in another machine we copy the release folder and .exe.

But in android studio I am seeing my colleagues test the debug apk by copying and deploying in other systems using USB drive. seems working also. May I know what is the consequence of deploying that version? Is the release version relevant only for a play store purpose?

What is the technical difference/consequence other than that debug version contains debug information which may makes it slow or bulky?

Answer

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.