Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
361 views
in Technique[技术] by (71.8m points)

android - Difference between debug and release apks

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...