Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android options should be disabled if Android config is disabled #3022

Closed
timsneath opened this issue Dec 18, 2020 · 3 comments
Closed

Android options should be disabled if Android config is disabled #3022

timsneath opened this issue Dec 18, 2020 · 3 comments
Labels
in flutter Relates to running Flutter apps is bug
Milestone

Comments

@timsneath
Copy link
Contributor

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:
image

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:
image

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.

@DanTup
Copy link
Member

DanTup commented Dec 23, 2020

@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?

@DanTup DanTup added in flutter Relates to running Flutter apps upstream in dart / flutter Needs changing in Dart or Flutter labels Jan 12, 2021
@DanTup DanTup added this to the v3.19.0 milestone Jan 12, 2021
@DanTup
Copy link
Member

DanTup commented Jan 12, 2021

Jonah has an open PR for this at flutter/flutter#73736 🙂

@DanTup
Copy link
Member

DanTup commented 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!

@DanTup DanTup closed this as completed Jan 12, 2021
@DanTup DanTup removed the upstream in dart / flutter Needs changing in Dart or Flutter label Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in flutter Relates to running Flutter apps is bug
Projects
None yet
Development

No branches or pull requests

2 participants