当我尝试在Windows上运行Flutter应用程序时,出现了这个错误消息:
Building Windows application...
CMake Error at CMakeLists.txt:2 (project):
Generator
Visual Studio 16 2019
could not find any instance of Visual Studio.
我已经安装了Visual Studio 2022,并且安装了许多工具,就像下面这张图片中展示的那样:
![enter image description here](https://istack.dev59.com/cpeJQ.webp)
and this what I got from Flutter Doctor:
E:\mp\my_class>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, 2.8.0-3.2.pre, on Microsoft Windows [Version 10.0.22000.318], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Community 2022 17.0.2)
[√] Android Studio (version 2020.3)
[√] IntelliJ IDEA Ultimate Edition (version 2021.2)
[√] VS Code (version 1.62.3)
[√] Connected device (3 available)
• No issues found!