Skip to content

Support dynamic asset modules on Android #51522

Closed

Description

@sfshaza2

Some of our developers are not able to publish their apps to the Play Store, due to large asset files, or large library files (app bundles larger than 150mb are not allowed). They need a solution. It seems that, in the long term, the solution is to use APK expansion files.

This is a huge pain point for affected developers.

For more context, see Issue flutter/website#2215 on the flutter/website repo.

Activity

  1. ollyde commented on Feb 27, 2020

    @ollyde

    @sfshaza2 just to add to this we have a video app that has many types of video codecs in it and gif generation tools. Currently, we cannot post it to the Android app store. Seem's to be no solution for us since it isn't the assets that are too big.

  2. added
    a: sizeReducing IPA/APK/JS sizes
    engineflutter/engine related. See also e: labels.
    perf: app sizePerformance issues related to app size (binary/code size) or disk space
    c: new featureNothing broken; request for a new capability
    t: gradle"flutter build" and "flutter run" on Android
    platform-androidAndroid applications specifically
    on Feb 27, 2020
  3. xster commented on Feb 27, 2020

    @xster
    Member

    @OllyDixon any chance you can share with us the breakdown of the APK/AAB content so we could know where to start looking?

  4. pascalfriedrich commented on Feb 27, 2020

    @pascalfriedrich

    I need this feature too, I even thought about rewriting the app in Xamarin Forms. What a scary thought ;-)

    My app is a soundboard and contains hundreds of soundfiles, some small icons and just a few .dart files besides the flutter default files.

  5. WallyHale commented on Feb 27, 2020

    @WallyHale

    We have an app with 3 language packs for an audio tour app. These are ~60Mb each, so obviously when bundled in assets, it means the APK is too large for Google Play.

    The language packs are available to download from a server, however this is not practical due to where users install the app. WiFi is not existent when on the tour, and usually those needing other languages are on roaming data, which is expensive and also not available in a lot of places on site!

    The base app and libraries is under the Google Play threshold, and in native Android, we would add an expansion file/OBB for the language packs, however this isn't available.

    The app also uses AR which means the APK is large, but Unity allows splitting the package into an OBB, but Flutter is where this breaks down as well.

  6. xster commented on Feb 27, 2020

    @xster
    Member

    Thanks for the feedback. These are useful.

    So far, it sounds like we're talking about assets. Are these Flutter managed assets that were added from the pubspec?

    If so, I'd rescope this feature request.

    Having a plugin that makes use of the Play Core API to dynamically load new asset modules for app bundles is reasonable. If that's the request, we'll add it to our queue.

    This implies we're excluding: ask expansions/obbs, since they're not supported with AABs and AABs are the current Android delivery recommendations.

    Dynamic modules for native libraries or AOT snapshot code compiled from Dart (or generally anything other than assets) since they introduce additional complexities.

  7. changed the title [-]Unable to publish large apps to the app store[/-] [+]Support dynamic asset modules on Android[/+] on Feb 27, 2020
  8. Sun3 commented on Feb 28, 2020

    @Sun3

    For one of my clients they have proprietary audio files that need to be embedded into the app and these assets are greater than 150 MB limit.

  9. xster commented on Feb 28, 2020

    @xster
    Member

    @Sun3 thanks for the feedback. Yup, that falls in the above categorization (e.g. assets only).

  10. WallyHale commented on Feb 28, 2020

    @WallyHale

    As far as I have seen, Android App bundles do not work with expansion files? Only APK does. Or am I missing something.

  11. xster commented on Feb 28, 2020

    @xster
    Member

    That's what I was saying above. If we do add support, it would be for dynamic modules rather than expansion files and only for assets.

  12. WallyHale commented on Feb 28, 2020

    @WallyHale

    Pardon my misunderstanding, how will this allow us to publish larger app packages to Google Play?

  13. added
    a: releaseChallenges faced when attempting to productionize an app
    on Feb 28, 2020
  14. ollyde commented on Feb 29, 2020

    @ollyde

    @xster I'll see if I can produce a demo app with a library over 150mb. Mainly FFmpeg library that's taking a fair chunk (I'm aware of their optimizations but that's off point).

    Do you think Dart/Flutter could load dynamic libraries with the APK expansion files?

  15. xster commented on Mar 10, 2020

    @xster
    Member

    @OllyDixon can you point me to the specific libraries?

  16. ollyde commented on Mar 10, 2020

    @ollyde

    @xster it's a few libraries but the main one is FFMPG, I'm aware you can use light versions of the library but we use some of the more advanced features.

  17. xster commented on Mar 13, 2020

    @xster
    Member

    Can you point to the specific maven link so we can look at it and see if there are optimizations we can make?

  18. added
    c: performanceRelates to speed or footprint issues (see "perf:" labels)
    on Mar 30, 2020
  19. added
    P3Issues that are less important to the Flutter project
    on Jun 15, 2020
  20. xster commented on Dec 16, 2020

    @xster
    Member

    Now that we're getting fairly close on #57617, I'm going to merge this bug in. When split feature modules is completed, it will support deferred asset loading on Android.

  21. github-actions commented on Aug 8, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  22. locked as resolved and limited conversation to collaborators on Aug 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecta: releaseChallenges faced when attempting to productionize an appa: sizeReducing IPA/APK/JS sizesc: new featureNothing broken; request for a new capabilityc: performanceRelates to speed or footprint issues (see "perf:" labels)engineflutter/engine related. See also e: labels.perf: app sizePerformance issues related to app size (binary/code size) or disk spaceplatform-androidAndroid applications specificallyt: gradle"flutter build" and "flutter run" on Android

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions