App Bundle Publishing in Android: What It Is and How It Works
In this article
App bundle publishing in Android is a publishing format introduced by Google that allows developers to upload a single artifact—the Android App Bundle (.aab)—to the Google Play Store, from which Google generates and delivers optimized APKs for users' specific devices. This replaces the older method of uploading multiple APKs manually and improves app size efficiency, performance, and distribution.
Background and Origin of App Bundles
Before the Android App Bundle, developers had to create and manage multiple APKs (Android Package Kits) to support different device configurations such as screen density, CPU architecture, and language. This was inefficient and error-prone. Google introduced the Android App Bundle in 2018 as the new standard publishing format to streamline this process.
The App Bundle is not an installable file like an APK. Instead, it is a zip archive containing all the compiled code and resources of an app, organized in a way that allows Google Play to generate optimized APKs on demand. This format is now required for all new apps on Google Play, making it the official standard for Android app publishing.
How App Bundle Publishing Works
When a developer uploads an Android App Bundle (.aab), Google Play uses it to generate different APKs tailored to each user’s device configuration. This process, called Dynamic Delivery, ensures users only download the code and resources they need.
Here’s how it works step by step:
- The developer builds the app using Android Studio and exports it as an Android App Bundle (.aab file).
- The .aab is uploaded to the Google Play Console.
- Google Play analyzes the bundle and creates device-specific APKs.
- When a user installs the app, Google Play serves only the necessary APK components (e.g., English strings, arm64-native libraries, xxhdpi images).
- The user downloads a smaller, optimized version of the app.
This system reduces app size by up to 15% on average, leading to faster downloads, lower data usage, and improved install rates.
Key Components of an App Bundle
An Android App Bundle contains several key modules and directories that define how the app is structured and delivered:
- Base module: Contains core app functionality and is required for installation.
- Configuration APKs: Generated per device configuration (e.g., language, screen density, ABI).
- Dynamic feature modules: Optional components that can be downloaded on demand (e.g., a camera filter pack or VR mode).
- Asset slices: Large assets (like game levels) that can be delivered separately.
For example, a user with a French phone and an arm64 processor will receive only the French-language resources and arm64-native code, skipping unnecessary files for other languages or CPU types.
Benefits of Using App Bundles
Adopting app bundle publishing offers several measurable advantages:
- Smaller app sizes: Users download only what they need, reducing storage use and data costs.
- Simplified publishing: Developers manage one .aab file instead of multiple APKs.
- On-demand delivery: Dynamic features can be downloaded later, improving initial install speed.
- Better performance: Optimized code per device can improve app responsiveness.
- Support for Play Asset Delivery: Large assets (like games) can be delivered in chunks based on device capabilities.
A real-world example is a mobile game that includes high-resolution textures for tablets and lower-res versions for phones. With app bundles, tablet users get the high-res assets, while phone users don’t waste space downloading them.
Common Problems and Troubleshooting
While app bundles are powerful, developers sometimes encounter issues:
- Testing difficulties: Since the .aab isn’t directly installable, developers must use Android Studio or generate test APKs via
bundletool. - Missing resources: Incorrect module configuration can lead to crashes if a required resource isn’t included in the base module.
- Dynamic module delays: On-demand features may take time to download, affecting user experience.
- Legacy device compatibility: Very old devices may not support dynamic delivery, though this is rare.
If an app fails to install from a bundle, check that all essential code and resources are in the base module. Use the bundletool build-apks command to generate APKs for testing on physical devices.
App Bundle vs. APK: Key Differences
Understanding the distinction between App Bundles and APKs is critical:
- APK: A single, self-contained installable file. Must include all code and resources for all supported devices.
- App Bundle (.aab): A publishing format that contains all app content but is not directly installable. Google Play uses it to generate optimized APKs.
For instance, an APK might be 100MB because it includes English, Spanish, and Chinese strings, plus arm32 and arm64 code. The same app as an .aab could result in 60MB downloads for most users, depending on their device.
Developers can no longer upload APKs as the main format for new apps on Google Play—app bundles are required. However, APKs are still used for sideloading and third-party stores.
Frequently Asked Questions
Is app bundle publishing required on Google Play?
Yes, Google requires all new apps and games to be published using the Android App Bundle format. This policy has been in effect since August 2021. Existing apps that were previously using APKs can continue, but new apps must use .aab.
Can I install an .aab file directly on my phone?
No, you cannot install an .aab file directly. It is a publishing format, not an installable package. To test it, use Android Studio or the bundletool command-line tool to generate APKs for your specific device.
Does app bundle publishing reduce app size for all users?
Yes, most users benefit from smaller downloads because they receive only the resources their device needs. The exact reduction depends on the app’s structure and the user’s device configuration. Apps with many languages or high-res assets see the biggest savings.
Can I still use multiple APKs instead of an app bundle?
No, Google no longer accepts multiple APKs for new apps. The app bundle is the standard. For existing apps using multiple APKs, Google encourages migration to the bundle format for better optimization and management.
What tools do I need to create an app bundle?
You can generate an app bundle using Android Studio (recommended), the Gradle build system, or the bundletool command-line tool. Android Studio provides the easiest interface through the Build > Generate Signed Bundle / APK menu.
Are dynamic features mandatory in an app bundle?
No, dynamic feature modules are optional. Most apps use only a base module. Dynamic features are useful for large apps (like games or media apps) that want to deliver content on demand to save space.