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
Provide x86 (32 and 64-bit?) Android Release binaries #9253
We learned in #2898 that Android x86 accounts for over 1% of Android devices, that's over a million devices.
This bug tracks doing so.
EDIT: See @rmacnak-google comments below. Implementing x86 Android Ahead of Time (AOT) compiled binaries will require a substantial amount of work in the Dart compiler. We could however implement JIT-based --release binaries for x86 with some minor plumbing work if needed.
@rmacnak-google Are there any Dart limitations to supporting x86 Android Release binaries (i.e. does AOT work)? If so could you please link to such bugs?
Assuming no Dart limitations, it should be possible to work around us not currently providing these pre-built binaries by building the flutter engine yourself and using the --local-engine option to flutter: https://github.com/flutter/engine/blob/master/CONTRIBUTING.md
The Dart VM does not support AOT compilation for x86. AOT is supported for x64, ARM, ARM64 and MIPS.
(When targeting x86, we reference constants directly from instructions, but on all other architectures we load them through a constant pool, which allows us to handle their relocation. It is possible to do this on x86 as well, but it is a substantial change.)
The VM does support disabling the vm-service, etc for the JIT just as it does for AOT, so it would be possible to build a release version of the engine for x86 that uses the JIT.
when I tried to launch demo application I got the message
Profile and release builds are only supported on ARM targets.
Error running application on ASUS T00J.
It is very sadly that flutter is not for x86, because there are many devices on Intel atom.
Reacted by costa974, Vadim, Taner Ozdas, Carrie Liu, vikalpnagar and kauepark
Just to chime in to this, I've just had this issue where I needed to ship a new Android build ASAP for a certain app while I was out and about, and I didn't have a USB cable to connect my phone to my computer to smoke test the build. I was counting on being able to use the Android emulator but I found out about this limitation. It was a painful moment but I managed to get a cable from someone and test the build; had I not been at an Android meetup I'd have had some issues, though.
I think it's quite important to get to support Android release builds on emulators. I did not expect this limitation to be there, and I imagine most other devs wouldn't either. It's not a small issue
either in normal flows — why should I not be able to run my app on an emulator? What if I need to run screenshot tests on a CI without physical emulators? Or maybe auto-generate screenshots for the store listing, or any other number of legit workflows in which one needs to be able to install a release build on to an emulator.
I went through the steps described here: https://github.com/flutter/flutter/wiki/JIT-Release-Modes to build an x86 jit-release build. However, now I seem to be stuck on the step of figuring out how to use x86 jit-release build in my Flutter app. The instructions in the linked document talk about using the "flutter assemble" command, but there isn't much documentation that I can find on how to use that command. Any help with that?
Note Flutter currently does not support building for x86 Android (issue #9253) directly, however apps built for ARMv7 or ARM64 run fine (via ARM emulation) on many x86 Android devices.
still not supported
flutter build apk --target-platform android-x86 is failing
FAILURE: Build failed with an exception.
What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
Could not resolve all task dependencies for configuration ':app:releaseCompileClasspath'.
Could not find io.flutter:x86_release:1.0.0-540786dd51f112885a89792d678296b95e6622e5.
Required by:
project :app
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
It's a shame that x86 (32 and 64-bit flavors) are not fully supported by Flatter on Android. Intel processor support is now more important than ever - my apps for example are used not only on Android phones and tablets, but also on Chromebooks, many of which have Intel processors, or under emulators (BlueStacks, NoxPlayer and others) on computers. x86 flavors installs of Android apps are on the rise constantly, at least in my experience. Please reconsider this strange policy decision.
Reacted by Antti Ahti, walidbagh, Ricardo Lecheta, Duy Tran, Birdy 83, alexwan, BansookNam, Josh Leibstein, Alessandro Biessek, Andy and 3 more
Flutter haven't support AOT for x86 (32 bit) yet, but the app was built without this architecture still work fine because each Android x86 device has an "ARM emulation".
You can see image below (Asus zenfone 2), the CPU architecture is x86, but this device has an "ARM emulation" so the Instructions Sets also include armeabi-v7a which will help you run arm apps.
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 Apr 6, 2017
See also #2089 which is a similar bug for iOS about providing more flavors of pre-built binaries.
eseidelGoogle commentedon Apr 6, 2017
@rmacnak-google Are there any Dart limitations to supporting x86 Android Release binaries (i.e. does AOT work)? If so could you please link to such bugs?
eseidelGoogle commentedon Apr 6, 2017
Assuming no Dart limitations, it should be possible to work around us not currently providing these pre-built binaries by building the flutter engine yourself and using the
--local-engineoption toflutter:https://github.com/flutter/engine/blob/master/CONTRIBUTING.md
rmacnak-google commentedon Apr 6, 2017
The Dart VM does not support AOT compilation for x86. AOT is supported for x64, ARM, ARM64 and MIPS.
(When targeting x86, we reference constants directly from instructions, but on all other architectures we load them through a constant pool, which allows us to handle their relocation. It is possible to do this on x86 as well, but it is a substantial change.)
The VM does support disabling the vm-service, etc for the JIT just as it does for AOT, so it would be possible to build a release version of the engine for x86 that uses the JIT.
danilNikolaenko1990 commentedon Jun 12, 2017
when I tried to launch demo application I got the message
Profile and release builds are only supported on ARM targets.
Error running application on ASUS T00J.
It is very sadly that flutter is not for x86, because there are many devices on Intel atom.
eseidelGoogle commentedon Sep 28, 2017
Given the amount of work in the Dart VM, I suspect this is more realistically M4 than M3.
refi64 commentedon Oct 15, 2017
So, in the mean time I've been distributing a debug APK...not fun!
I've built Flutter manually in x86 release mode, but when I try to build the app it crashes saying precompilation isn't supported.
Is there a way to make a release build of Flutter with precompilation disabled?
refi64 commentedon Nov 2, 2017
So I managed to build it for X86 in release mode with AOT disabled using this patch:
Except, someone tried it, and it's stuck on a black screen. The logcat doesn't mention anything wrong. Is this even possible right now? 😐
rock3r commentedon Jan 17, 2018
Just to chime in to this, I've just had this issue where I needed to ship a new Android build ASAP for a certain app while I was out and about, and I didn't have a USB cable to connect my phone to my computer to smoke test the build. I was counting on being able to use the Android emulator but I found out about this limitation. It was a painful moment but I managed to get a cable from someone and test the build; had I not been at an Android meetup I'd have had some issues, though.
I think it's quite important to get to support Android release builds on emulators. I did not expect this limitation to be there, and I imagine most other devs wouldn't either. It's not a small issue
either in normal flows — why should I not be able to run my app on an emulator? What if I need to run screenshot tests on a CI without physical emulators? Or maybe auto-generate screenshots for the store listing, or any other number of legit workflows in which one needs to be able to install a release build on to an emulator.
mit-mit commentedon Mar 6, 2018
Note: when this is eventually fixed, make sure to update the FAQ: https://github.com/flutter/website/pull/856/files
86 remaining items
jonahwilliams commentedon Nov 7, 2019
@Matt1700 please file a bug with details on how you built it and your flutter version
Matt1700 commentedon Nov 8, 2019
@jonahwilliams here's the issue #44425
apecoraro commentedon Feb 13, 2020
I went through the steps described here: https://github.com/flutter/flutter/wiki/JIT-Release-Modes to build an x86 jit-release build. However, now I seem to be stuck on the step of figuring out how to use x86 jit-release build in my Flutter app. The instructions in the linked document talk about using the "flutter assemble" command, but there isn't much documentation that I can find on how to use that command. Any help with that?
tarek360 commentedon Apr 16, 2020
@eseidel @Hixie @chinmaygarde @mit-mit
Do we need to update FAQs and remove this note? 👇
tarek360 commentedon Apr 17, 2020
@apecoraro have you found a way to do it?
apecoraro commentedon Apr 17, 2020
@tarek360 nope, I eventually gave up because I found that the ARM emulation mode worked fine, at least on the Chromebook.
magicleon94 commentedon Apr 29, 2020
Any idea on when this is going to hit the stable channel?
Robert3141 commentedon May 5, 2020
If this is now supported please update the FAQ
mit-mit commentedon May 5, 2020
Logged flutter/website#4039 for the FAQ issue
kw2019ltd commentedon May 10, 2020
still not supported
flutter build apk --target-platform android-x86 is failing
FAILURE: Build failed with an exception.
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 1m 5s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 66.6s
Gradle task assembleRelease failed with exit code 1
gregko commentedon Jun 21, 2020
It's a shame that x86 (32 and 64-bit flavors) are not fully supported by Flatter on Android. Intel processor support is now more important than ever - my apps for example are used not only on Android phones and tablets, but also on Chromebooks, many of which have Intel processors, or under emulators (BlueStacks, NoxPlayer and others) on computers. x86 flavors installs of Android apps are on the rise constantly, at least in my experience. Please reconsider this strange policy decision.
duytq94 commentedon Jul 29, 2020
Flutter haven't support AOT for x86 (32 bit) yet, but the app was built without this architecture still work fine because each Android x86 device has an "ARM emulation".

You can see image below (Asus zenfone 2), the CPU architecture is x86, but this device has an "ARM emulation" so the Instructions Sets also include armeabi-v7a which will help you run arm apps.
github-actions commentedon Aug 1, 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.com.carriez.flutter_hbb 1.2.3