Introduction to Android App Bundle

  • Base APK
  • Configuration APKs
  • Dynamic feature APKs
  • Locale
  • Screen density
  • CPU architecture

Getting started with the code

You will find the Android app bundle more useful when it deals with more complex real-world applications and has supported different languages, density images, architectures. Then you will get substantially reduced size of the apk.

Building Bundles

First, open app/build.gradle and add the following inside the android {} block:

bundle {
language {
enableSplit = true
}
density {
enableSplit = true
}
abi {
enableSplit = true
}
}
  • Only res values corresponding to the device locale. A user with the default language set to Japanese, for example, would get only the strings in values-jp, not all strings.
  • Only assets corresponding to the device screen density. For xxxhdpi device, this means only the contents of drawable-xxxhdpi are served, not the contents targeting other densities.
  • If a module has an x86 and an ARM CPU architecture, only the relevant native libraries for that architecture.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jitesh Mohite

Jitesh Mohite

I am technology enthusiastic, want to learn things quickly and dive deep inside it. I always believe in developing logical things which makes impact on end user