Affiliate links on Android Authority may earn us a commission.Learn more.
Reduce your APK size with Android App Bundles and Dynamic Feature
August 08, 2025
Creating an app that can run across the full range of Android devices is one of the biggest challenges facing Android developers.
Even if you take the time to create code and resources optimized for all the different screen densities, CPU architectures, and languages, you can quickly end up with a whole new problem: a bloated APK full of code, resources, and assets the user doesn’t evenneed.

Arecent studyfrom Google showed APK size directly affects the number of people who end up installing your app after visiting its Google Play page. For every 6MB increase in the size of your APK, you may expect to see a one percent decrease in the installation conversion rate. Everything you can do to reduce the size of your APK will increase the chances of the user downloading your app.
Let’s look at Android App Bundle, a new publishing format that can help you support the full range of Android devices whilereducingthe size of your APK.

By the end of this article, you’ll have configured, built, and tested a project supports the App Bundle format, and uploaded this Bundle to the Google Play Console, ready to publish and share with your users.
Because APK size is such a big deal, I’ll also show you how to trim even more megabytes from your APK, by dividing your App Bundle into optionaldynamic featuremodules that users can download on demand.

What is Android App Bundle?
Previously, when it was time to publish your Android app, you had two options:
Now, Android developers have a third option: publish an Android App Bundle (.aab) and let Google Play handle the rest!

Once you’ve uploaded your .aab file, Google Play will use it to generate the following:
Google Play can also generate one or moredynamic feature APKs.

Often, an application has one or even multiple features not required to deliver its core functionality, for example if you’ve developed a messaging app, not all of your users will need to send GIFs or emojis.
When you build an App Bundle, you can reduce the size of your APK by separating these features into dynamic feature modules users can then download on demand, if required. If a user requests a dynamic feature module, Dynamic Delivery will serve them a dynamic feature APK containing only the code and resources required to run this specific feature, on the user’s specific device.
In this article, I’ll be adding a dynamic feature module to our App Bundle. However, dynamic feature modules are currently still in beta, so if your Bundle includes dynamic feature modules youwon’tbe able to publish it to production (unlessyou enrol in thedynamic features beta program).
Why should I use this new publishing format?
The major benefit of Android App Bundles, is the reduced APK size. There’sevidence to suggestAPK size is a huge factor in how many people install your application, so publishing your app as a Bundle can help ensure it winds up on as many devices as possible.
If you’ve previously resorted to building multi-APKs, then Bundles can also simplify the build and release management process. Instead of navigating the complexity, potential for error, and general headaches of building, signing, uploading, and maintaining multiple APKs, you can build a single .aab, and let Google Play do all the hard work for you!
However, there are a few restrictions. Firstly, APKs generated from the App Bundle must be100MB or smaller. In addition, devices running Android 4.4 and earlier don’t support split APKs, so Google Play can only serve your App Bundle to these devices as multi-APKs. These multi-APKs will be optimized for different screen densities and ABIs, but they’ll include resources and code foreverylanguage your application supports, so users running Android 4.4 and earlier won’t savequiteas much space as everyone else.
Creating an app that supports the Android App Bundle
you’re able to publish an existing app in the App Bundle format, but to help keep things straightforward we’ll be creating an empty project, and then building it as an App Bundle.
Create a new project with the settings of your choice. By default, the Google Play Console will take your App Bundle and generate APKs targeting all of the different screen densities, languages, and Application Binary Interfaces (ABI) your application supports. There’s no guarantee this default behavior won’t change in a subsequent update, so you shouldalwaysbe explicit about the behavior you want.
To let the Play Console knowexactlywhich APKs it should generate, open your project’s build.gradle file, and add a “bundle” block:
you may now specify whether Google Play should (“true”) or shouldn’t (“false”) generate APKs targeting specific screen densities, languages, and ABIs:
The base module’s build.gradle file also determines the version code Google Play will use forallthe APKs it generates from this Bundle.
Testing your Android App Bundle
When testing your app, you can either deploy a universal APK, or an APK from your Bundle optimized for the specific Android smartphone, tablet, or Android Virtual Device (AVD) you’re using to test your app.
To deploy an APK from your App Bundle:
Adding on-demand features with Dynamic Delivery
While wecouldbuild an App Bundle at this point, I’m going to add a dynamic feature module, which will be included in our Bundle.
To create a dynamic feature module:
Exploring the Dynamic Feature Module
You can now add classes, layout resource files, and other assets to your dynamic feature module, just like any other Android module. However, if you take a look at your project’s build.gradle files and Manifest, you’ll notice some important differences:
1. The Dynamic Feature Module’s Manifest
This defines some important characteristics for the dynamic feature module:
2. The module’s build.gradle file
This file applies the dynamic-feature plugin, which includes all the Gradle tasks and properties required to build an App Bundle includes a dynamic feature module. The build.gradle file should also name your base (“app”) module as a project dependency:
3. The base feature module’s Manifest
Every time you create a dynamic feature module, Android Studio will update your app module’s build.gradle file, to reference this dynamic module:
Requesting features at runtime
Once you’ve created a dynamic feature module, you’ll need to give the user a way to request that module at an appropriate time. For example, if you’ve created a fitness application, tapping your app’s “Advanced exercises” menu might trigger a workflow that’ll download the dynamic “AdvancedExercises” module.
To request a module, you’ll need the Google Play Core library, so open your base feature module’s build.gradle file, and add Core as a project dependency:
Next, open the Activity or Fragment where you want to load your dynamic feature module, which in our application is MainActivity.
To kickoff the request, create an instance of SplitInstallManager:
Next, you need to create the request:
A project can consist of multiple dynamic feature modules, so you’ll need to specify which module(s) you want to download. You can include multiple modules in the same request, for example:
Next, you need to submit the request via the the asynchronous startInstall() task:
Your final task is acting on a successful download, or gracefully handling any failures that occur:
Every time you upload a new version of your App Bundle, Google Play will automatically update all its associated APKs, including all your dynamic feature APKs. Since this process is automatic, once a dynamic feature module is installed on the user’s device, you don’t need to worry about keeping that module up-to-date.
Here’s our completed MainActivity:
Giving your users instant access to Dynamic Feature Modules
By default, the user will need to restart their app before they can access any of the code and resources associated with their freshly-installed dynamic feature mode. However, you can grant your users instant access, with no restart required, by adding SplitCompatApplication to your base (“app”) module’s Manifest:
Testing your modular app
Any dynamic feature modules you include in your project are entirely optional, so you’ll need to test how your app functions when the user installs different combinations of these modules, or even if they completely ignore your dynamic feature modules.
When testing your app, you can choose which dynamic feature module(s) to include in the deployed APK:
You can now run this app on your Android smartphone, tablet, or AVD, and only the selected dynamic feature modules will be deployed.
Get ready for Google Play: Building your Bundle
Once you’re happy with your App Bundle, the final step is uploading it to the Google Play Console, ready to analyze, test, and eventually publish.
Here’s how to build a signed version of your App Bundle:
Android Studio will now generate your App Bundle, and store it in your AndroidAppBundle/app/release directory.
Uploading your dynamic App Bundle
To upload your App Bundle to Google Play:
How many APKs were included in your Bundle?
The Google Play Console will take your Bundle and automatically generate APKs for every device configuration your application supports. If you’re curious, you may view all of these APKs in the Console’s App Bundle Explorer:
The subsequent screen displays an estimate of how much space you’ve saved, by supporting App Bundles.
You can also choose between the following tabs:
Finally, you can view a list of all the devices each APK is optimized for, by selecting that APK’s accompanyingView devicesbutton.
The subsequent screen includes a Device catalogue of every smartphone and tablet your chosen APK is compatible with.
Wrapping up
Now you can build, test, and publish an App Bundle, and know how to create a dynamic feature module users can download on demand.
Do you think this new publishing format could take the pain out of supporting multiple Android devices? Let us know in the comments!
Thank you for being part of our community. Read ourComment Policybefore posting.