๐Ÿงช Testing, Debugging, and Performance

How to Reduce Android App Size

App size affects install conversion, especially for users on limited storage and data plans. Most size problems come from a few sources: images, native libraries, unused dependencies and shipping everything to everyone. Here's how to find and fix them.

โœ๏ธ Yunok Tech ๐Ÿ“… Updated โฑ 3 min read ๐ŸŽฏ Intermediate
On this page
  1. Measure first
  2. 1. Publish App Bundles
  3. 2. Enable R8 and resource shrinking
  4. 3. Images
  5. 4. Native libraries
  6. 5. Dependencies
  7. 6. On-demand delivery
  8. Prevent regressions
  9. Typical wins
  10. Frequently asked questions
  11. Conclusion

A large download is a quiet conversion killer. Users with full storage or expensive data skip it, and size matters even more in markets where entry-level phones are common. Fortunately, Android's toolchain does much of the work if you let it.

Measure first

  • Play Console โ†’ App size shows download and install sizes per device configuration.
  • APK Analyzer (Build โ†’ Analyze APK) breaks a build down by DEX, resources, assets and native libraries, and can compare two builds.
Where app size typically comes from A bar split into typical contributors: native libraries, images and assets, DEX code, resources and fonts. Matching fixes: App Bundle splits per ABI, image compression and vectors, R8 shrinking and fewer dependencies, resource shrinking and downloadable fonts. native libs (.so) images / assets DEX code resources, fonts ABI splits (AAB) WebP/AVIF, vectors R8, fewer deps shrinkResources Proportions vary by app. APK Analyzer shows your real breakdown.
Attack the largest category first. Shaving kilobytes off code rarely matters if a single native library is several megabytes.

1. Publish App Bundles

With an Android App Bundle (.aab), Google Play generates optimised APKs per device. Each device downloads only its CPU architecture's native code, its screen density's resources and its language strings. AAB is required for new apps on Google Play. Make sure you aren't defeating it, for example by packaging all languages into a single asset.

2. Enable R8 and resource shrinking

app/build.gradle.ktsGradle KTS
android {
    buildTypes {
        release {
            isMinifyEnabled = true
            isShrinkResources = true
        }
    }
    androidResources {
        // Keep only languages you actually support (prevents libraries adding dozens of translations)
        localeFilters += listOf("en", "hi", "pa", "ta")
    }
}

See ProGuard and R8 Explained. The localeFilters property name varies by AGP version (older versions used resourceConfigurations).

3. Images

  • Use vector drawables for icons and simple illustrations.
  • Convert raster images to WebP (Android Studio can convert them) or AVIF where your minSdk supports it.
  • Don't ship huge images for small displays. Provide appropriately sized assets.
  • Load large or rarely used images from a CDN at runtime instead of bundling them.

4. Native libraries

  • Check whether a dependency pulls in large .so files (ML runtimes, video, crypto) you only use for one feature.
  • With App Bundles, each device only gets its own ABI.
  • Consider dynamic feature modules or on-demand downloads for large optional features.

5. Dependencies

Find what's pulled inShell
./gradlew :app:dependencies --configuration releaseRuntimeClasspath
  • Remove unused libraries. Watch for heavy SDKs used for one small function.
  • Prefer modular artifacts (for example specific Play services modules, not all of them).
  • Use downloadable fonts instead of bundling font files where possible.

6. On-demand delivery

Play Feature Delivery (dynamic feature modules) and Play Asset Delivery let you ship large features and assets only to users who need them, at install time, conditionally, or on demand. They add complexity, so use them for genuinely large, optional parts of the app.

Prevent regressions

  • Track release AAB/APK size in CI and fail or alert on unexpected growth.
  • Compare builds in APK Analyzer when adding a new dependency.

Typical wins

Image-heavy onboarding

Converting PNG illustrations to WebP or vectors often saves megabytes.

Unused translations

Locale filters remove dozens of library translations you don't support.

Optional ML feature

Moving a large on-device model to on-demand download keeps the base install small.

Frequently asked questions

What's the difference between download and install size?

Download size is the compressed transfer. Install size is what occupies the device after installation, including extracted and compiled code. Play Console reports both.

Does Compose increase app size?

It adds library code, which R8 shrinks substantially. Migrating fully off Views can offset part of it.

Is there a Play Store size limit?

Yes. Google Play enforces limits on base module and total sizes, with asset delivery for larger content. Check current limits in Play Console Help.

Conclusion

To reduce app size: publish App Bundles, enable R8 and resource shrinking, optimise images, scrutinise native libraries and dependencies, filter locales, and use on-demand delivery for large optional features. Then guard size in CI.

Next step: automate builds and checks with CI/CD for Android with GitHub Actions.

Official references

๐Ÿ“ฑ Apps built by Yunok Tech

Real Android apps on Google Play, free to download.

See all our apps โ†’

Ready to build real Android applications?

Performance work starts with understanding how Android apps are built and how they behave at runtime. Strengthen those fundamentals and the profiling tools start to make sense.

Move beyond theory and strengthen your Android development skills with Yunoktech's Android course. Learn core concepts, practical implementation, modern Android development techniques, and the reasoning behind building maintainable applications.

Explore the Android course and take your next step as an Android developer.

Share: LinkedIn X / Twitter WhatsApp