How to compress apk size?

Updated on October 31, 2019 in General
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
4 on October 29, 2019

As titled. I’m currently learning to develop 2d platformer game in android. However, the apk size is too big (around 28 MB). The game itself have no audio, have only a little of sprites, and only 2 levels.

  • Liked by
Reply
3 on October 29, 2019

The biggest assets you probably have, are textures. Make sure all your sprites and textures are compressed, or if you can, move them to be on 1 single texture that you can just pull from.

And if possible, try cutting out 1 of your scenes. If the 1st one is just a menu, make it a UI overlaying the entire scene, and just pause the game behind it. Unity scenes, even if they’re empty, still take up space.

on October 30, 2019

Here’s my build report & apk size :

——————————————————————————————————————–

Build Report
Uncompressed usage by category (Percentages based on user generated assets only):
Textures 3.1 mb 16.6%
Meshes 0.0 kb 0.0%
Animations 9.8 kb 0.1%
Sounds 0.0 kb 0.0%
Shaders 475.8 kb 2.5%
Other Assets 67.6 kb 0.4%
Levels 258.8 kb 1.4%
Scripts 1.2 mb 6.3%
Included DLLs 13.3 mb 72.0%
File headers 140.8 kb 0.7%
Total User Assets 18.5 mb 100.0%

——————————————————————————————————————–

Apk size : https://ibb.co/PZbXG6Q

——————————————————————————————————————–

And yes, my first scene is just a menu.

Wise
on October 30, 2019

So DLLs are your biggest ones, followed by textures.

You probably need most of those DLLs, but I would still go through the package manager and remove anything that you’re not gonna be using for your app 

on October 31, 2019

I’ve tried to remove ads, in-app purchase, and rider editor from package manager and it still doesn’t change anything, lol. Thanks anyway.

Show more replies
  • Liked by
Reply
Cancel