Reputation: 3198
Pretty new to flutter android build , I have analysed my apk with android studio and below are the results ,
It says APK size is 200+ but Download size is 90+ , will this be accepted in play store.
Also , this APK has 6 internal bundles , why are they bundled together,looks like they are increasing the overall app size.Is there any rules to avoid this .
Q : I have used the 'keep' rule in my pro-guard file as instructed by different package owners.Is that contributing to the total app size ?
Q : Finally , when building a new .abb bundle the file size is below 100MB , will that cause app crashes , why is the file size low ?
Upvotes: 0
Views: 1227
Reputation: 17437
The size limit if 150MB for apps and is calculated based on the maximum download size that would be sent to one device.
Bundletool has a command get-size total
that allows you to estimate this.
Your download size being 90MB including all ABIs, you're already below the threshold so that won't be a problem (in practice, devices would receive only 1 ABI so it will be even lower).
Regarding your other questions:
Upvotes: 1
Reputation: 977
APK used to consist of all of the localized resources, all screen size resources, all CPU architecture binaries, etc. It is very simple to create an APK. One click and you are done.
Small phones are getting Big phones resources and vice versa. We are directly wasting not only so much bandwidth but memory on users phones as well. If we have something in abundance, it does not mean we should waste it
Bundle format is the binary format that consists of many apks inside. The apks are dependent on the localization, screen density, CPU architecture, etc. These apks are downloaded in users phone intelligently by play store
As you read before the Android platform supports one app having multiple apks. It could be API level, screen size, CPU architecture, etc. Now is the time to make it better. All you need to do is generate the new binary format (Bundle) and the tool will take care of generating the required APKs. You do not need to mention factors (API, screen, CPU etc). Not only this, tools can take it to the next level and truly generate a lot of apks from one bundle ( by adding more factors like language ). For example, my app bundle has the following apks inside
The bundle has 25 apks. Split intelligently using the languages, CPU architecture, screen size etc. All with zero code. Now if a user downloads this app from the play store, Google play will send not one but a few apks based on the device requirements. It might send it
Upvotes: 1