Skip to content

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

Closed

Description

@timsneath

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.

Activity

  1. DanTup commented on Dec 23, 2020

    @DanTup
    Member

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

  2. added this to the v3.19.0 milestone on Jan 12, 2021
  3. DanTup commented on Jan 12, 2021

    @DanTup
    Member

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

  4. DanTup commented on Jan 12, 2021

    @DanTup
    Member

    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!

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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions