I have never used Android Studio before. The size of a simple "Hello world" app generated by default is almost 800k, while it is less than 100k in eclipse. I find that there are too many pictures in the drawable files, they seem come from res/all
under the build
folder, they still exist even if I delete the folder res
manually.
My question is how to shrink the apk size in this situation?
The difference is due to the appcompat library which is compiled in by default to New Project Wizard-generated projects in Android Studio if you target an API level lower than 14. When I ran a test, the size increase was 642k for a debug APK, and 411k for a release APK (with Proguard enabled -- that will strip out unused code but not unused resources).
There's not a lot you can really do about this, short of removing the appcompat library if you're not using any of its features (though you should probably be using its features).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With