APK File size reduction checklist

107 views Asked by At

I am developing a 2D game for Android with Unity.

At the first stage of development the file size was 18 MB with almost nothing in it. Then it grew up to 65 MB and I've managed to reduce it to 45 MB using the checklist below. But I think it can be smaller yet.

The things I have tried so far:

  1. Removing duplicate or unused assets
  2. Reducing sprite sizes
  3. Reducing SFX sample rate and bit rate
  4. Using Texture Compression for sprites
  5. Removing external assemblies

Is there anything else that I should add to the checklist?

2

There are 2 answers

0
John O'Reilly On

Use ProGuard (https://developer.android.com/studio/build/shrink-code.html). For example add something like following to your release build type in build.gradle.

    release {
        shrinkResources true
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
0
Dhamodharan On

Android Studio provides the excellent tool called Inspect Code from Analyze Menu which highlights the unused imports, objects, resources etc along with other optimizations

minify enable and shrinkResource will reduce the decent amount of APK size

Since the image resources are playing major role in APK size, Kindly have a look at Here