On this page3 sections
In markets where storage is tight and data is prepaid, APK size is a conversion metric. Play stats show install completion dropping measurably per 10 MB. Here is the diet that took a production app to well under half its size.
Find out where the weight is
# Android Studio: Build > Analyze APK, or:
unzip -l app-release.apk | sort -k1 -rn | head -20The breakdown was: 40% native libs (all four ABIs shipped), 25% images (PNGs that should have been vector or WebP), 15% an analytics SDK the app barely used.
The cuts, in order of pay-off
- App Bundle + ABI splits. Shipping arm64-v8a to an arm64 phone instead of four ABIs: the single biggest cut, roughly 30% of the original.
shrinkResources+ R8 full mode. Dead drawables and unused SDK classes: roughly another 12%.- PNG to WebP / vector.
cwebp -q 80on everything over 50 KB: roughly another 10%. - Audit dependencies. The “barely used” SDK was replaced by 60 lines of code: the last 5% or so.
buildTypes.release {
isMinifyEnabled = true
isShrinkResources = true
}Keep it cut
Size regresses silently, so CI enforces a budget: build the bundle, compare against a threshold, fail on +1 MB unexplained. Like structural loads - you do not check a beam once and stop looking. You monitor.