You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add the ability to build fat APKs with flutter build #6864
Right now, the APK built with flutter build apk doesn't work on an android emulator.
After talking to @eseidelGoogle on gitter, he asked me to open an issue:
@Pacane I think having the ability to build fat apks using flutter build is a very reasonable request. Would you mind filing a bug?
Note: The reason was that I was sending the built .apk to my tester, lacking a better workflow, and it didn't work.
❯ flutter install [12:49:10]
Installing app.apk to Android SDK built for x86 64...
Installing build/app.apk...
Failed to install build/app.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
Oops; flutter has exited unexpectedly: "Exit code 1 from: /opt/android-sdk/platform-tools/adb -s emulator-5554 install -r build/app.apk".
Crash report written to /home/joel/code/dart/catalogue-mouches/flutter_03.log;
please let us know at https://github.com/flutter/flutter/issues.
So it is possible to build an apk for a simulator with flutter build apk --target-arch=x86, but we don't currently have the ability to bundle more than one arch in a single apk from that command.
@Pacane that's true, you'd have to pass --debug --target-arch=x86. :/ So it's possible that fat APKs don't actually make sense at least x86 vs. arm. Maybe arm and arm64.
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.
Activity
eseidelGoogle commentedon Nov 15, 2016
So it is possible to build an apk for a simulator with
flutter build apk --target-arch=x86, but we don't currently have the ability to bundle more than one arch in a single apk from that command.Pacane commentedon Nov 15, 2016
@eseidelGoogle Though I have just tried it, and received this:
I have just upgraded Flutter too.
eseidelGoogle commentedon Nov 15, 2016
@Pacane that's true, you'd have to pass
--debug --target-arch=x86. :/ So it's possible that fat APKs don't actually make sense at least x86 vs. arm. Maybe arm and arm64.Pacane commentedon Nov 15, 2016
Gotcha, works fine, thanks!
eseidelGoogle commentedon Jan 19, 2017
This might get fixed as part of moving
flutter buildonto gradel. FYI @mit-mitmit-mit commentedon Jan 20, 2017
@jakobr-google, also covered?
jakobr-google commentedon Jan 20, 2017
Yep. We are actually building a fat APK right now, we just only include native binaries for ARM... It'll be fixed as part of my work.
I'm leaning towards having split APKs as the default, to keep APK size down, but we can discuss this separately.
Update gradle example to support x86 in debug mode.
Update gradle example to support x86 in debug mode. (#7606)
github-actions commentedon Sep 5, 2021
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 -vand a minimal reproduction of the issue.