How to compress apk size?

Updated 3 days ago in General
Share on Facebook0Tweet about this on TwitterShare on Google+0Share on Reddit0
6 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
0 on December 25, 2019

This is one of the downsides to using game engines like Unity, App inventor, Unreal, etc.

Without manually installing every package yourself that you will need like is normally done in Android Studio development, you will in essence be providing a full instruction book and library. 

So, short answer, you can’t really compress it down to less. Not unless you want to learn to develop apps with a different program from scratch.

But, on the bright side, 28 MB really isn’t that much these days, right?

  • Liked by
Reply
Cancel
0 3 days ago

Unity has a special thread for that. It is called “Project Tiny”.

You can read more about it here: https://blogs.unity3d.com/2018/12/05/project-tiny-preview-package-is-here/

 

  • Liked by
Reply
Cancel