Skip to content

Support for Android App Bundles #17829

Description

@vandie

While I'm aware that Flutter makes use of tree shaking which decreases the file size of the app drastically, I was wondering if the flutter build tools were likely to support Google's new Android App Bundle method of building any time soon?

Info on Android App Bundles

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    c: new featureNothing broken; request for a new capability
    on Aug 3, 2018
  2. added this to the milestone on Aug 3, 2018
  3. modified the milestones: , on Oct 16, 2018
  4. pranayairan commented on Nov 16, 2018

    @pranayairan
    Contributor

    I open up a PR to add support for app bundle. #24440

  5. vandie commented on Nov 29, 2018

    @vandie
    Author

    Awesome. I assume this can be closed once that's merged in.

  6. pranayairan commented on Dec 21, 2018

    @pranayairan
    Contributor

    Support for app bundle is added. Check this PR #24440

    I will be adding another PR to update the documentation.

  7. danwulff commented on Feb 28, 2019

    @danwulff

    @pranayairan Any update on documentation? Looking at the android release documentation I don't see anything: https://flutter.dev/docs/deployment/android

  8. pranayairan commented on Mar 1, 2019

    @pranayairan
    Contributor

    @danwulff sorry I was not able to add the documentation. The process to update documentation is a little complex, I will get it done in a week or two, thanks for the reminder.

  9. saikarthik952 commented on Mar 16, 2019

    @saikarthik952

    Flutter crash report; please file at https://github.com/flutter/flutter/issues.

    command

    flutter build appbundle

    exception

    FileSystemException: FileSystemException: Cannot copy file to 'D:\Karthik\madmemesbro\build\app\outputs\bundle\app.aab', path = 'D:\Karthik\madmemesbro\build\app\outputs\bundle\app.aab' (OS Error: The process cannot access the file because it is being used by another process.
    , errno = 32)

    #0      _File.throwIfError (dart:io/file_impl.dart:643:7)
    #1      _File.copySync (dart:io/file_impl.dart:348:5)
    #2      _LocalFile&LocalFileSystemEntity&ForwardingFile.copySync (package:file/src/forwarding/forwarding_file.dart:29:50)
    #3      _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:604:16)
    <asynchronous suspension>
    #4      buildGradleProject (package:flutter_tools/src/android/gradle.dart:346:14)
    <asynchronous suspension>
    #5      buildAppBundle (package:flutter_tools/src/android/app_bundle.dart:43:10)
    <asynchronous suspension>
    #6      BuildAppBundleCommand.runCommand (package:flutter_tools/src/commands/build_appbundle.dart:43:11)
    <asynchronous suspension>
    #7      FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:549:18)
    #8      _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/lib/async_patch.dart:77:64)
    #9      _rootRunUnary (dart:async/zone.dart:1132:38)
    #10     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
    #11     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
    #12     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
    #13     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
    #14     Future._complete (dart:async/future_impl.dart:473:7)
    #15     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
    #16     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/lib/async_patch.dart:33:20)
    #17     _rootRun (dart:async/zone.dart:1124:13)
    #18     _CustomZone.run (dart:async/zone.dart:1021:19)
    #19     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
    #20     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
    #21     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
    #22     _runPendingImmediateCallback (dart:isolate/runtime/lib/isolate_patch.dart:115:13)
    #23     _RawReceivePortImpl._handleMessage (dart:isolate/runtime/lib/isolate_patch.dart:172:5)
    

    flutter doctor

    �[32m[✓]�[39m Flutter (Channel master, v1.3.11-pre.12, on Microsoft Windows [Version 10.0.17134.648], locale en-IN)
        �[32m•�[39m Flutter version 1.3.11-pre.12 at C:\Users\saika\flutter
        �[32m•�[39m Framework revision 439fbbe69e (28 hours ago), 2019-03-15 07:53:27 -0700
        �[32m•�[39m Engine revision b36068c377
        �[32m•�[39m Dart version 2.2.1 (build 2.2.1-dev.1.0 None)
    
    �[32m[✓]�[39m Android toolchain - develop for Android devices (Android SDK version 28.0.3)
        �[32m•�[39m Android SDK at C:\Users\saika\AppData\Local\Android\sdk
        �[32m•�[39m Android NDK location not configured (optional; useful for native profiling support)
        �[32m•�[39m Platform android-28, build-tools 28.0.3
        �[32m•�[39m Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
        �[32m•�[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
        �[32m•�[39m All Android licenses accepted.
    
    �[32m[✓]�[39m Android Studio (version 3.3)
        �[32m•�[39m Android Studio at C:\Program Files\Android\Android Studio
        �[32m•�[39m Flutter plugin version 33.0.1
        �[32m•�[39m Dart plugin version 182.5215
        �[32m•�[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    
    �[32m[✓]�[39m VS Code, 64-bit edition (version 1.28.2)
        �[32m•�[39m VS Code at C:\Program Files\Microsoft VS Code
        �[32m•�[39m Flutter extension version 2.21.1
    
    �[32m[✓]�[39m Connected device (2 available)
        �[32m•�[39m Redmi Note 6 Pro          • 626980d4      • android-arm64 • Android 8.1.0 (API 27)
        �[32m•�[39m Android SDK built for x86 • emulator-5554 • android-x86   • Android 9 (API 28) (emulator)
    
    �[32m•�[39m No issues found!
    
  10. noinskit commented on May 6, 2019

    @noinskit

    I'm confused that this issue is closed - the main point of AAB (as I understand it) is support for multiple platforms, and flutter's support is still only able to build only one target platform at a time, both in "apk" and "appbundle". Could adding support for multi-target-platform builds be prioritised, please?

  11. dzoidx commented on May 30, 2019

    @dzoidx

    yes, flutter build appbundle is useless while it build only one target, it must build for all supported platforms by default

  12. Nisthar commented on Nov 5, 2019

    @Nisthar

    @noinskit @dzoidx if flutter only build for one target, why do they add support for appbundle?

  13. github-actions commented on Aug 15, 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.

  14. locked as resolved and limited conversation to collaborators on Aug 15, 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

    c: new featureNothing broken; request for a new capabilitytoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions