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.
有什么办法告诉Flutter Visual Studio的位置吗?我希望可以将一些环境变量用于此目的。
有人吗?
答案 0 :(得分:1)
我读到flutter只检查默认的摄影棚位置。
情况已不再如此;它现在使用随Visual Studio 2017+安装的vswhere
实用程序。预计这是可靠的,因此没有手动配置选项。
如果您仍然可以使用Flutter master的最新版本重现此问题,请file a bug包括您的Visual Studio安装的详细信息。