Skip to content

Flutter does not provide prebuilt ARM64 binaries for Android #6715

Closed

Description

@eseidelGoogle

At least not to my knowledge.

Activity

  1. added
    platform-androidAndroid applications specifically
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Nov 4, 2016
  2. added this to the milestone on Feb 27, 2017
  3. tvolkert commented on Dec 22, 2017

    @tvolkert
    Contributor

    Per @chinmaygarde:

    I suspect there will be some complexity in the tooling w.r.t the AOT snapshotter since the i386 based snapshotter for armv7a wont work when creating snapshots for aarch64 (we could just the same snapshotter that is used for iOS but obviously that is absent on linux hosts).

  4. eseidelGoogle commented on Jan 4, 2018

    @eseidelGoogle
    ContributorAuthor

    This will be required by the Play Store by August 2019:
    https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html

    I expect we'll have it long before then however.

  5. eseidelGoogle commented on Jan 12, 2018

    @eseidelGoogle
    ContributorAuthor

    @chinmaygarde @cbracken @mravn-google @jason-simmons do we have a high-level guesstimate of what work will be required to make this work?

  6. chinmaygarde commented on Jan 17, 2018

    @chinmaygarde
    Contributor
    • On the engine side there is nothing to do. ./flutter/tools/gn --android --android-cpu=arm64 should build the appropriate engine.
      • Estimate: See if it already works and we haven't broken it :)
    • The buildbot would have to build and upload the assets to the cloud.
      • Estimate: Maybe a few mins to cook up the patch to build and upload the new artifacts.
    • The Flutter tools currently assume that Android uses the armv7 engine and iOS the aarch64 engine. Because of this, it defaults to using the i386 gen_snapshot for Android targets and the x86_64 gen_snapshot for iOS when generating the AOT snapshot. This assumption would no longer hold and the tools would need to select the correct gen_snapshot depending on the Android target CPU. I believe flutter build flx already has a --flavor flag that we can use to communicate the intent to the Android build scripts as well. We already support x86_64 Android target so arm64 should be more of the same kind of variant selection.
      • Estimate: I am not too familiar with the Flutter tooling side but it can't be more than a few days work at most for someone unfamiliar with that codebase.
  7. mravn-google commented on Jan 18, 2018

    @mravn-google
    Contributor

    On Android, the --flavor option is currently used to specify Android product flavor (e.g. demo version vs full version of the app), not target architecture.

    We could repurpose it of course, but we risk confusing Android developers.

    Gradle tooling supports building multiple APKs at the same time, each targeting a different density/ABI combination.

  8. a-siva commented on Jan 30, 2018

    @a-siva
    Contributor

    We have two options -

    flutter build aot
    flutter build apk and
    flutter build flx
    

    build both the 32 bit and 64 bit flavors always

    or

    we wire the --target-platform which is currently only supported in 'flutter build aot' to accept android-arm64. This same option would also have to be plumbed into 'flutter build flx' and 'flutter build apk' for consistency.

  9. Hixie commented on Jan 30, 2018

    @Hixie
    Contributor

    What would flutter run build?

  10. Hixie commented on Jan 30, 2018

    @Hixie
    Contributor

    I think it makes sense to have a --target-platform (with some useful default).

    flutter build flx will presumably go away soon.

    Ideally flutter install would call flutter build in the same way that flutter run does, picking the right default, so it's only when you actually ship the final app that you have to worry about this.

    What does the play store expect? Binaries for every architecture supported?

  11. cbracken commented on Jan 30, 2018

    @cbracken
    Member

    I think it makes sense to have a --target-platform (with some useful default).

    Agreed. Potentially also useful for iOS, depending on how we implement armv7 support, once that makes it higher in the priority list (though I'd imagine the implementation there might be fat binaries most of the time).

  12. eseidelGoogle commented on Jan 31, 2018

    @eseidelGoogle
    ContributorAuthor

    We had a client need this sooner than expected. @jason-simmons took this on and is almost done.

  13. modified the milestones: , 3: Current Milestone on Jan 31, 2018
  14. cbracken commented on Feb 12, 2018

    @cbracken
    Member

    @jason-simmons is this safe to close?

  15. Hixie commented on Feb 14, 2018

    @Hixie
    Contributor

    @jason-simmons says this is fixed!

  16. github-actions commented on Sep 3, 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.

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

Metadata

Metadata

Assignees

Labels

platform-androidAndroid applications specificallytoolAffects the "flutter" command-line tool. See also t: labels.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions