Skip to content

How do I build my app for x86 to run on appetize.io (and other services)? #7539

Closed

Description

@graddotdev

Currently when I try run my application on the appetize.io I get this error:

APK has native code but does not have x86 architecture. Switching device type to physical Nexus 5, aka "hammerhead". Please try again.

Activity

  1. changed the title [-]Run the app on appetize.io[/-] [+]How do I build my app for x86 to run on appetize.io (and other services)?[/+] on Jan 19, 2017
  2. eseidelGoogle commented on Jan 19, 2017

    @eseidelGoogle
    Contributor

    This may get easier as part of the hello_services refactor underway, FYI @mit-mit.

    However we also probably need to publish some additional artifacts, as noted in #2898.

  3. eseidelGoogle commented on Jan 19, 2017

    @eseidelGoogle
    Contributor

    flutter build apk --target-arch x86 should work today?

  4. mit-mit commented on Jan 20, 2017

    @mit-mit
    Member

    @jakobr-google will your build changes resolve this?

  5. jakobr-google commented on Jan 20, 2017

    @jakobr-google
    Contributor

    Yep, after the change we'll produce either a universal APK, or APKs split on ABI, and we should support x86 profile/release builds as well.

    @Aleki If your app is not gradle-based (hello_services example), then you can get a x86 debug APK using flutter build apk --debug --target-arch=x86. I've verified that this does run in appetize.io, but it's slightly slower than a release APK due to running in debug mode.

  6. graddotdev commented on Jan 20, 2017

    @graddotdev
    Author

    @jakobr-google My app is gradle-based 😔

  7. jakobr-google commented on Jan 20, 2017

    @jakobr-google
    Contributor

    Then hang tight. I'm working on fixing this right now.

  8. added a commit that references this issue on Jan 24, 2017
    f4d1f43
  9. added a commit that references this issue on Jan 31, 2017
    a0f0c42
  10. jakobr-google commented on Jan 31, 2017

    @jakobr-google
    Contributor

    Just to clarify: With the PR I just merged, we now include both x86 and ARM native code in debug builds of the hello_services example. Profile and release builds still only contain ARM code.

  11. mit-mit commented on Feb 24, 2017

    @mit-mit
    Member

    Validated that this works:

    Create and build app

    flutter create testapp
    cd testapp
    flutter build apk --debug
    

    Then upload `/android/app/build/outputs/apk/app-debug.apk' to https://appetize.io and run it on a Nexus 5 (virtual, not physical)

  12. rodydavis commented on May 18, 2018

    @rodydavis
    Contributor

    @mit-mit That worked for me thank you!

  13. carly1987 commented on Dec 19, 2018

    @carly1987

    run: "flutter build apk --release --target-arch=arm64-v8a"
    return: Could not find an option named "target-arch".

  14. zoechi commented on Dec 19, 2018

    @zoechi
    Contributor

    @carly1987

     $ flutter build apk -h
    Build an Android APK file from your app.
    
    ...
    
        --target-platform         [android-arm (default), android-arm64]
    
    Run "flutter help" to see global options.
    
  15. github-actions commented on Aug 31, 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.

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

    platform-androidAndroid applications specifically

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions