Skip to content

"Unable to launch Flutter project in a Dart-only workspace" when trying to launch a Flutter app added to a non-Flutter workspace #5612

@DanTup

Description

@DanTup

At around 46:00 in https://www.youtube.com/watch?v=EsklFa3nkwA, trying to run the project with CodeLens resulted in:

"Unable to launch Flutter project in a Dart-only workspace"

My guess is that the workspace was opened without a Flutter project initially, so we detected the workspace as Dart-only, and then when a Flutter project was later added, we didn't update.

When in a Dart workspace, we should watch for pubspec.yaml being updated/created and check again if this is a Flutter project. If we need to upgrade from Dart to Flutter, we need to perform an extension restart (since we may need to find a Flutter SDK whereas before we might have only had a Dart one).

(cc @craiglabenz @RandalSchwartz)

Metadata

Metadata

Assignees

No one assigned

    Labels

    in debuggingRelates to the debug adapter or process of running debug sessionsin flutterRelates to running Flutter appsis bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions