本文介绍: This week, my Android App Bundle’s size reached 161MB after introducing several new features. I was frightened that my aabs size exceeds the size limitation of Android App Bundles. But I tried to upload the oversize aab to the Google Play and it worked.

1 Problem Background

This week, my Android App Bundle’s size reached 161MB after introducing several new features. I was frightened that my aab’s size exceeds the size limitation of Android App Bundles. But I tried to upload the oversize aab to the Google Play and it worked. I was confused and did many research to figure it out, here’s what I got.

2 Can the Android App Bundle’s size be over 150MB?

Yes, Android App Bundles’s size can be over 150MB. As the official Android Developer Document Android App Bundles-Compressed download size restriction said, the total size of the compressed APKs required to install our app (for example, the base APK + configuration APKs) must be no more than 150 MB, rather than the Android App Bundles’s size.

3 How to measure the size range of compressed APKs from my app bundle?

Although Android App Bundles’s size can be over 150MB, we must be curious about the real size range of compressed APKs, as we wanna know the left available size for our app to use.

Fortunately, Google shared methods to estimate our app’s download size for a given device configuration. This is helpful to better understand the user experience of downloading our app and checking whether our app meets the compressed download size restriction for app bundles or enabling instant experiences.

After you build your Android App Bundle, you should test how Google Play uses it to generate APKs and how those APKs behave when deployed to a device. There are two ways you should consider testing your app bundle: locally using the bundletool command line tool and through Google Play by uploading your bundle to the Play Console and using a test track.

When bundletool generates APKs from your app bundle, it includes them in a container called an APK set archive, which uses the .apks file extension. To generate an APK set for all device configurations your app supports from your app bundle, use the bundletool build-apks command, as shown below.

bundletool build-apks --bundle=/MyApp/my_app.aab --output=/MyApp/my_app.apks

To measure the estimated download sizes of APKs in an APK set as they would be served compressed over-the-wire, use the get-size total command:

bundletool get-size total --apks=/MyApp/my_app.apks

My Android App Bundle /MyApp/my_app.aab’s size is 161MB. Here’s the result I got from bundletool get-size total command, which means the size range of compressed APKs from my app bundle is between 105632514 Bytes to 111835648 Bytes. 111835648 Bytes is equal to 106.65MB, which is less than 150MB. Therefore, we figure out that my Android App Bundle have 43.35MB left available size to use.

bogon:bundletool happylee$ bundletool get-size total --apks=/MyApp/my_app.apks
MIN,MAX
105632514,111835648

Reference:
Android App Bundles-Compressed download size restriction
Android App Bundles-Estimate our app’s download size

原文地址:https://blog.csdn.net/wq6ylg08/article/details/128035829

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。

如若转载,请注明出处:http://www.7code.cn/show_10099.html

如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注