Difference Between APK (.Apk) and App Bundle (.Aab)

Difference between apk (.apk) and app bundle (.aab)

App Bundles are a publishing format, whereas APK (Android application PacKage) is the packaging format which eventually will be installed on device.

App Bundles use bundletool to create a set of APK. (.apks)
This can be extracted and the base and configuration splits as well as potential dynamic feature modules can be deployed to a device.

The dependencies can look something like this:
Bundletool modules

The contents of an App Bundle look kind of like this:
Bundletool contents

More information on App Bundles is available here.

Why App Bundle weights more than when it's .apk file?

The size reported by Android is the size your app takes on the device: because the platform optimizes the dex file, the size it occupies on the device can be much bigger than the actual size of the file you see on your machine.

And the size reported by Play Console is the download size, which is usually smaller than the file you see on your machine since it is further compressed

Is it mandatory to upload aab(Android App Bundle) instead of APK file

  1. So the question is, is it mandatory to upload only aab files to PlayStore or normal apk file can also be updated

Normal APK can also be uploaded / updated. This is just a warning and not an error message. Google Play will still allow you to continue


  1. If aab file has to be uploaded, then how to sign the aab file before
    uploading.

In Android Studio, when building signed APK / AAB, it will ask you to export an encrypted key. Take note of the location because you will use this exported key when you upload your AAB. See highlighted in yellow enter image description here

I referred this Link for Goolge App signing. Is this also required ?

Nope, it's optional. Quoting Google Play Support:
Using app signing by Google Play is optional. You can still upload an APK and manage your own keys instead of using an app bundle. However, if you lose your keystore or it becomes compromised, you won’t be able to update your app without publishing a new app with a new package name. https://support.google.com/googleplay/android-developer/answer/7384423

Does app bundle converts to apk during instalation on device from Google Play?

Yes Google Play extracts apk from aab

https://developer.android.com/guide/app-bundle

Android and the AAB format (Android App Bundle): Google says

All new releases, including already existing apps on Google Play, require AAB format

This is incorrect. As you initially said, the change as stated today only applies to apps that upload an artifact for the first time.

Google has not communicated what the plan is for existing apps.



Related Topics



Leave a reply



Submit