谷歌应用商店上传aab大小可以超过150MB吗?Can the Android App Bundle‘s size be over 150MB?(Google Play, aab, Android)

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

快乐李同学(李俊德-大连理工大学)

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值