Affiliate links on Android Authority may earn us a commission.Learn more.

Boost your app downloads by shrinking your app size

June 17, 2025

Since the Android Marketplace launched in March 2012, average app size has quintupled. Some of this increase makes sense. Today, we expect richer content, better graphics, and more features from our mobile apps, and none of this comes for free! The memory available on your typical Android device has increased, so why shouldn’t apps make use of this extra space if it helps them deliver a better user experience?

If your app is going to reach as many users as possible, you need to pay attention to the size of your Android Package Kit (APK). Arecent studypublished by a Strategy and Operations Analyst at Google showed APK size directly affects the number of people who end up installing your application after visiting its store page. According to these findings, for every 6 MB increase in the size of your APK, you may expect to see a 1 percent decrease in the installation conversion rate.

Article image

There are many reasons why the size of your APK might be holding your application back:

In this article, I’m going to show you how to ensure people visiting your app’s Google Play page actually end up installing it by sharing tools, techniques, and new features to help create a much leaner APK.

Article image

Remove unused methods and classes with ProGuard

ProGuard is a tool which can identify and remove unused classes, fields, methods, and attributes from your application code and any libraries you may be using.

For the best result use theproguard-android-optimize.txtfile, which has the same settings as the defaultproguard-android.txtfile, but with optimizations that perform analysis inside and across methods.

Article image

Here’s how to enable ProGuard in your project’s module-levelbuild.gradlefile:

Every time you build your project, ProGuard will generate aapp/build/outputs/mapping/release/usage.txtfile that lists everything ProGuard has removed from your APK, so check it to verify it hasn’t stripped away any code your project actually needs.

If ProGuard does remove necessary code, then open the build/intermediates/proguard-files/proguard-android-optimize.txt-3.0.1.txt file and use the -keep flag to specify the code that you want to hang onto:

Article image

Since ProGuard may remove code that your project does actually require, you should always test your project with ProGuard enabled, before publishing your final APK.

Remove all unreferenced resources

Sometimes unused resources can find their way into your project, particularly if you’re using libraries. Since unreferenced resources are just taking up unnecessary space, you should tell Gradle to search for, and remove these resources by enabling resource shrinking:

Whenever you build your project, the Gradle Console will provide an overview of how many resources it’s managed to remove, but you may view a list of these resources in your project’sapp/build/outputs/mapping/release/resources.txtfile.

While resource shrinking can help reduce the size of your APK, it has its limitations. It cannot remove resources from the “values” folder, and it won’t remove unnecessary alternative resources.

You should use resource shrinking in combination with Lint, a static scanning tool which can identify resources that aren’t referenced in your code.s

To run Lint, selectAnalyze — Inspect Code…from the Android Studio toolbar. If Lint detects any unused resources, then it’ll display the following message in a newInspection Resultswindow: “Unused resources— The resourceR.drawable.ic_launcher_background2appears to be unused.”

Lint can only detect unused resources, so you’ll still need to remove them manually.

Compress your drawables

Graphical assets are often the biggest contributor to APK size, so compressing your drawables can significantly reduce the size. If you’re working with JPEGs, you can try a compression tool such aspackJPG. If your project contains PNGs you can usezopflipng,pngcrush,OptiPNG,TinyPNGorpngquant.

The Android Asset Packaging Tool (AAPT) optimizes the contents of yourres/drawablefolder automatically. If you compress your PNGs before passing them to AAPT, then it may actually end up inflating your PNGs.

If you compress your PNGs manually, make sure you disable the AAPT process for them like this:

Switch to WebP

If your project’sminSdkVersionis 18 or higher, converting a PNG, JPEG or BMP to WebP format often provides better compression, as well as the same image quality.

If you switch to WebP, you’ll still need to provide your launcher icon as a PNG.

Modify images at runtime

If you need to use variations of the same image, try to supply a single “base” image that you customize at runtime wherever possible. you may apply a tint to an image usingsetTint()and rotate drawables using attributes likeandroid:fromDegreesandandroid:pivotY.

Use vector graphics

On Android 5.0 and higher, you’re able to draw assets at runtime by defining aVectorDrawable, which is an XML representation of a vector. These XML files contain path commands telling Android how to draw the lines and arcs that make up this graphic.

Unlike many image formats, vectors can scale without losing definition, so you only need to provide one asset per image. However, renderingVectorDrawableobjects is an intensive process, and you should only use them for small, simple graphics.

Always do your research

Before adding any library to your project, you should check its code size so you know exactly what impact it’s going to have on your final APK. You should also look critically at the features this library provides, as it may contain a significant amount of code, as well as resources your project doesn’t actually need. For best results, always choose a library that’s compact, optimized for mobile, and contains only the features that you’re actually going to use.

There’s no shortage of third-party libraries out there, so it’s always worth shopping around to find the smallest library that still meets your needs.

Remove unused library code

Libraries may contain strings for a range of languages, but if you project doesn’t explicitly support these languages then these strings are just adding unnecessary bulk to your final APK.

Open yourbuild.gradlefile and specify the languages that your application officially supports, then Gradle will automatically exclude all resources for languages  your application doesn’t support, including strings from third party libraries:

Get specific with Google Play Services

Many projects use Google Play Services. Rather than adding the entire library to your project, you should only include the APIs you’re actually going to use. If you only require access to the Google Location APIs, then just use this:

Rather than this:

Consider creating multiple APKs

It’s pretty standard practice to publish a single APK containing alternate resources for different device configurations. Occasionally this strategy may require users to download a large number of assets they’ll never use. If your APK is packed with high-density graphics, you’re essentially asking users on low-density screens to waste precious storage space on images their device physically cannot display.

In this scenario, you may want to consider separating your single APK into multiple APKs which contain only the code and resources required for specific screen densities or Application Binary Interfaces (ABIs). When the user downloads your app from Google Play, they’ll receive an APK containing just the resources to target their particular device.

To generate APKs based on screen density, add the following to yourbuild.gradlefile:

Even if you generate multiple APKs for specific screen densities, Gradle will always generate an APK containing the assets for all screen densities, so verify you publish this universal APK to provide a fallback for devices that don’t match any of your density-specific APKs.

Different Android devices use different CPUs, which in turn support different instruction sets. Each combination of CPU and instruction set has an ABI, which defines how the application’s machine code interacts with the system.

Gradle bundles the binaries for all ABIs into a single APK by default, but you’re able to also create APKs based on ABI. When you tell Gradle to generate ABI-specific APKs, it won’t automatically generate a universal APK, so you’ll need to include explicit instructions to create this universal APK:

Google Play will not allow you to upload multiple APKs to the same listing, if those APKs have the same version information. If you create multiple APKs, you’ll need to assign each APK its ownversionCodevalue.

Allow your app to be installed on external storage

Some users may choose to extend their device’s built-in memory by adding external storage (most commonly an SD card). Unless you request otherwise, Android will prevent the system from installing your app on external storage, so installation will fail if there isn’t adequate on-device storage, though plenty of external storage is available.

To give Android the option of installing your app on external storage, open your project’s Manifest, and add either of the following lines:

Even if your APK is installed on external storage, all private user data, databases, optimized .dex files, and extracted native code will still be saved to internal memory.

Consider offering your project as an Instant App

If you follow all the above techniques and best practices, you should be able to significantly reduce the size of your APK. No matter how slim your APK, the process of downloading and installing an app will always be the biggest barrier between your application and potential new users.

So why not give users a way to experience your application without installing your APK?

Android’s “Instant Apps” feature lets you separate your app’s most important functionality into stand-alone modules, and map each of these modules to a URL. The user can then load a module on demand by clicking its URL, which makes your app instantly accessible from any location that supports URLs, like emails, Google search results, forums, and YouTube comments.

Behind the scenes, Instant Apps are delivered via a lightweight Instant Apps APK which contains only the code and resources required to deliver this particular feature, and always comes in at 4MB or under.

For users struggling with storage space, connectivity issues, or restrictive data plans, instant apps may be the only viable way of experiencing what your application has to offer. Hopefully, their experience with your Instant App will motivate them to install the complete APK further down the line, once they’re able.

Wrapping up

To ensure users aren’t put off by the size of your app or aren’t able to install it because it takes up too much of the internal storage, it is important to reduce the size of your final APK file.  The techniques above could bring some dramatic savings which hopefully will convert directly into downloads and a healthier installed base.

Do you have any additional tips for slimming down your Android apps? Let us know in the comments below!

Thank you for being part of our community. Read ourComment Policybefore posting.