Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Proposal]Support for Play Asset Delivery to by pass size limit when uploading app to Playstore #100855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
copypasteearth opened this issue Mar 27, 2022 · 19 comments
Labels
a: release Challenges faced when attempting to productionize an app c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter P3 Issues that are less important to the Flutter project platform-android Android applications specifically team-android Owned by Android platform team triaged-android Triaged by Android platform team

Comments

@copypasteearth
Copy link

copypasteearth commented Mar 27, 2022

Steps to Reproduce

I have 300MB bundle and I made a Deferred Component to hold 150MB worth of assets mp3 files. I uploaded it to google play and it keeps telling me One or more of the auto-generated multi-APKs exceeds the maximum allowed size of 150 MB.

in my main.dart I have a FutureBuilder that shows a loading indicator while i call the future
deferedbundle
[DeferredComponent.installDeferredComponent(componentName: "meditations")]

I tried to follow the steps exactly and I just cannot get it to work. I will provide whatever details you need, please this is imperative, I have to have this release by April 1st.

Thank you for your time.

Am I going about this wrong, any help to get this done would be great

@maheshj01 maheshj01 added the in triage Presently being triaged by the triage team label Mar 28, 2022
@maheshj01
Copy link
Member

Hi @copypasteearth, Thanks for filing the issue. Please take a look at the Android docs and see if it helps.

@maheshj01 maheshj01 added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Mar 28, 2022
@copypasteearth
Copy link
Author

@maheshmnj so is there a way to use deferred components as an asset pack?

@github-actions github-actions bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Mar 28, 2022
@maheshj01
Copy link
Member

@copypasteearth Unfortunately flutter currently doesn't support Play Asset Delivery. Deferred components is based on Play feature delivery. Labeling this issue as a proposal to Add support for Play Asset Delivery to by pass the size restriction limit when deploying to playstore.

@maheshj01 maheshj01 added c: new feature Nothing broken; request for a new capability platform-android Android applications specifically c: proposal A detailed proposal for a change to Flutter a: release Challenges faced when attempting to productionize an app framework flutter/packages/flutter repository. See also f: labels. and removed in triage Presently being triaged by the triage team labels Mar 28, 2022
@maheshj01
Copy link
Member

However, you might want to checkout third party plugins from pub https://pub.dev/packages/flutter_play_asset to unblock yourself.

@maheshj01 maheshj01 changed the title Deferred Components Google play saying One or more of the auto-generated multi-APKs exceeds the maximum allowed size of 150 MB. [Proposal]Support for Play Asset Delivery to by pass size limit when uploading app to playStore Mar 28, 2022
@maheshj01 maheshj01 changed the title [Proposal]Support for Play Asset Delivery to by pass size limit when uploading app to playStore [Proposal]Support for Play Asset Delivery to by pass size limit when uploading app to Playstore Mar 28, 2022
@maheshj01
Copy link
Member

cc: @GaryQian

@GaryQian
Copy link
Contributor

Since we don't control the android/play store side limitations, have you considered breaking up the assets into more components. If you break up into 3 deferred components, then each is ~100mb well under the limit. Since you are so close to the limit, different ways of counting mb (eg, 1000 vs 1024) may be putting you over somewhere

@copypasteearth
Copy link
Author

Yes I already tried to break it up into 4 components

@GaryQian
Copy link
Contributor

Could your issue be related to #96046 ?

If so, you can try using an older version of Flutter as this is a more recent regression.

@goderbauer goderbauer removed the framework flutter/packages/flutter repository. See also f: labels. label Mar 30, 2022
@copypasteearth
Copy link
Author

@GaryQian I tried flutter 2.2.3 and 2.2.5 I think, and the latest, I wound up using the play_asset_delivery package on pub.dev I noticed a difference was that I put "install-time" when using it in the build.gradle of the asset pack would that have made it work with deferred components?

@GaryQian
Copy link
Contributor

Using install-time would make the assets all download at initial install, so you would loose the benefit of dynamically downloading as needed, but it would indeed work in getting around the size limit.

@shapljts
Copy link

Any update on this? This is pretty critical, especially for offline-first and other data-intensive apps. It would be ideal to have Play Asset Delivery support in the platform.

@flutter-triage-bot flutter-triage-bot bot added team-android Owned by Android platform team triaged-android Triaged by Android platform team labels Jul 8, 2023
@pyrossh
Copy link

pyrossh commented Aug 2, 2023

Seems like there is this library now which helps in asset delivery.
https://pub.dev/packages/flutter_play_asset_delivery/example

But it would be good if we get official support as all other platforms allow upto 2GB for app sizes. But doesn't seem like there is a straight forward way.

@vandir
Copy link

vandir commented Jan 21, 2024

Any update on this?

@denghejun
Copy link

any update? need a solution

@untillnesss
Copy link

any update? need a solution

@Soap-141
Copy link

Would love this feature

@Gilianp
Copy link

Gilianp commented Oct 8, 2024

Any updates?

@yamashita-room-335
Copy link

Using the Flutter and pigeon library, I have created a sample app that can use the Play Asset Delivery (Android) and On-Demand Resources (iOS) features.

https://github.com/yamashita-room-335/online_assets

I have included a fair amount of comments as readme, so you may be able to implement these features in your own apps by copying any implementation you like!

@simeonApproppo
Copy link

I just found a easy way, how to integrate install-time asset packs with Play Asset Delivery.
Just add a Asset-Pack Folder in your android-Directory according https://developer.android.com/guide/playcore/asset-delivery/integrate-native (build.gradle for your module, add assetPacks on your app/build.gradle and add the include in the settings.gradle)
Then ensure that you put your assets under android/<myAssetPack>/src/main/assets/flutter_assets/assets/<your-assets>. Then you can access your assets in a normal way like: Image.asset('assets/<your-assets>')

This only works with install-time asset packs and when you deliver your AAB over Google Play. For local-testing and iOS just add your assets directly in the default-asset path and uncomment the assets in the pubspec.yaml when you make your Play-build.

With this you can deliver 4GB app bundles to Google Play (like you already can with IPAs on Apple App Store).
(Each asset pack should not exceed 1.5GB.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: release Challenges faced when attempting to productionize an app c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter P3 Issues that are less important to the Flutter project platform-android Android applications specifically team-android Owned by Android platform team triaged-android Triaged by Android platform team
Projects
None yet
Development

No branches or pull requests