- Home /
android apk size not getting much smaller
Hi,
Then I built my app for android final package of the app had like 20.1 MB. I mean the APK file. I checked unity editor log to see what files were taking most when unity was packing the project. I found on first 5 places 3 fonts like 2,5 MB each and 2 textures that were like 700kB each. So I made font to use my own defined characters instead of UTF8 and that made them significantly smaller like 500k or so. And textures I made half resolution so they ended up like 250kB. So after this I expected final APK to be smaller 6MB. But instead the resulting APK was like 19.5 MB. I double checked editor output and these resources indeed were much smaller. Why is this difference in end package so small? is there some heavy compression happening after what is logged in editor log as info what is size of each resource?
Thanks S.
Perhaps the editor log lists assets, not the imported versions?
You could have a very large image asset in your project, but the import settings (in the Inspector) will change it and that is what goes into the build.
For instance, a 11$$anonymous$$B 2000x2000 B$$anonymous$$P image in a unity asset folder can be set to 64x64 pixels with DTX1 compression in the inspector, which would result in a ~2$$anonymous$$B image. This imported image is the one that is used in the build.
The excess filesize is probably co$$anonymous$$g from the built-in Unity executable libraries (the stuff that you can't see in your project, because it's always there). Simply, the executable will never be less than about 15$$anonymous$$B because of the Unity engine itself.
Answer by Sanky · Feb 06, 2013 at 06:18 AM
you should try Stripping Level from playerSetting option. Also check you image Resolution 1024x1024 it will help you to reduce image size. And delete unused data from your project folder.