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
Android options should be disabled if Android config is disabled #3022
Flutter is gradually becoming less dependent on the assumption that any platform is enabled. As a result, we need more resilience against platforms being disabled.
Repro
I've run flutter config --no-enable-android, and restarted VSCode. I don't have Android Studio installed.
On choosing Flutter: Select Device, I'm prompted with:
Create Android emulator shouldn't be available in this setting, since it's not a viable option. If I select it, I get this error:
Platform
[✓] Flutter (Channel master, 1.26.0-2.0.pre.86, on macOS 11.1 20C69 darwin-arm, locale en-US)
• Flutter version 1.26.0-2.0.pre.86 at /Users/timsneath/flutter
• Framework revision b793285329 (2 hours ago), 2020-12-18 10:14:36 -0800
• Engine revision 7983c6fda0
• Dart version 2.12.0 (build 2.12.0-167.0.dev)
I'm running the 3.17.1 / 3.17.0 extensions for Dart / Flutter, respectively.
@jonahwilliams this is happening because "android" is still coming back from the Daemon's getSupportedPlatforms call (because there's an android folder on disk). Is it correct that this should be returning if the project contains an android folder, or should it be filtered out (here?) based on the setting?
This works as expected on latest Flutter with the PR above merged. Toggling the Android setting and reloading VS Code causes the Android options (inc. create emulator) to disappear/reappear. Thanks for the ping!
Activity
DanTup commentedon Dec 23, 2020
@jonahwilliams this is happening because
"android"is still coming back from the Daemon'sgetSupportedPlatformscall (because there's anandroidfolder on disk). Is it correct that this should be returning if the project contains anandroidfolder, or should it be filtered out (here?) based on the setting?DanTup commentedon Jan 12, 2021
Jonah has an open PR for this at flutter/flutter#73736 🙂
DanTup commentedon Jan 12, 2021
This works as expected on latest Flutter with the PR above merged. Toggling the Android setting and reloading VS Code causes the Android options (inc. create emulator) to disappear/reappear. Thanks for the ping!