Reputation: 17145
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:
Is there anything else that I should add to the checklist?
Upvotes: 0
Views: 123
Reputation: 305
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
Upvotes: 1
Reputation: 10350
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'
}
Upvotes: 0