Reputation: 5839
I read What is the difference between the apk file in the bin folder and the apk file created through the Export option in Eclipse? but I want to know are there any differences in performance between export apk and the build apk that generated in bin folder of eclipse
Upvotes: 2
Views: 749
Reputation: 200010
ProGuard is only run on the export APK, as mentioned in this comment on your linked question.
ProGuard optimization, such as explained in this article, can increase the speed of your application by doing some optimization, but is mostly used for size reduction (as ProGuard can strip out unused functions, etc).
Upvotes: 1
Reputation: 3785
The apk generated in the bin directory is mainly for debugging purposes. Your BuildConfig.DEBUG
variable is still set to true so if you have any logging or debugging messages attached to it they will execute. When you export your apk BuildConfig.DEBUG
is set to false, skipping logging and debugging messages. It also runs your apk through proguard which, if properly configured, can remove unused/unreachable code and library dependencies, as well as obfuscate your app if you so desire. In the end you have a leaner, more efficient apk.
Upvotes: 1
Reputation: 82563
There will be a very very minor difference in performance if you've followed the guidelines and enclosed all debug statements withing wrappers like:
if(BuildConfig.DEBUG) {
//log
}
Even if you have, the performance difference will be negligible to a human.
Other than that, the only difference is in the keystore used to sign the apk, and the BuildConfig.DEBUG
boolean's value.
Exporting an apk also runs the ProGuard tool on it, which can be used to obfuscate and clean up code and included libraries. This may result in a slight performance increase and/or apk file size decrease.
Upvotes: 1