Why apk size increase in different android version

拟墨画扇 提交于 2019-12-10 14:41:49

问题


I create a simple application and size of .apk generated by android studio is 1 MB, then i installed in android 2.3 version size increased to 3.48 MB , then i installed in android 5.0 version size increase to 5.48 MB.

My Question is only that why size of apk in increased in different version.


回答1:


When installing an APK in android system, what's installed is the DEX file. Which contains your code, resources etc compiled as binaries. Your dex is generally the same size of your apk, unless you have resources not compiled in assets.

Well, we all know that. What's not widelly spread is that android SAVES your original apk too. Perhaps for reinstalling in case of errors or for some other reasons.

That's why the amount of memory of our apps is the double in system. It's the sum of the size of the original apk and the installed dex.



来源:https://stackoverflow.com/questions/30782865/why-apk-size-increase-in-different-android-version

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!