【问题标题】:How to tell flutter where Visual Studio 2017 Community edition is installed?如何告诉颤振 Visual Studio 2017 社区版的安装位置?
【发布时间】:2019-11-13 11:25:54
【问题描述】:

Flutter 找不到我的 Visual Studio 2017 社区版:

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel master, v1.7.12-pre.40, on Microsoft Windows [Version 10.0.18922.1000], locale nl-BE)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
    Download at https://visualstudio.microsoft.com/downloads/.
[√] Android Studio (version 3.3)
[√] VS Code, 64-bit edition (version 1.35.1)
[√] Connected device (2 available)

! Doctor found issues in 1 category.

我读到颤振只检查默认的工作室位置。所以没有找到我的社区版也就不足为奇了。但是,由于此错误,flutter 拒绝运行:

PS C:\src\flutterapps\flutter-desktop-embedding\example> flutter run
Downloading Web SDK...                                              1,1s
Launching lib/main.dart on Windows in debug mode...
Unable to find suitable Visual Studio toolchain. Please run `flutter doctor` for more details.

有没有办法告诉颤振 Visual Studio 的位置?我希望某些环境变量可以用于此目的。

有人吗?

【问题讨论】:

    标签: visual-studio flutter flutter-desktop


    【解决方案1】:

    我读到 Flutter 只检查默认的工作室位置。

    现在已经不是这样了;它现在使用随 Visual Studio 2017+ 安装的 vswhere 实用程序。预计这是可靠的,因此没有手动配置选项。

    如果您仍然可以使用最新版本的 Flutter master 重现此问题,请file a bug 包括您的 Visual Studio 安装的详细信息。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-27
    • 1970-01-01
    • 1970-01-01
    • 2018-12-01
    • 1970-01-01
    相关资源
    最近更新 更多