windows - 无法在 MS VS 代码上运行 flutter 命令

标签 windows flutter visual-studio visual-studio-2010 flutter-dependencies

我在 VS 上创建了一个 flutter 项目,但无法通过 VS 代码的终端运行任何命令,我已经重新安装了 VS 代码,但仍然出现此错误:

[X] Visual Studio - develop for Windows
X Visual Studio not installed; this is necessary for Windows development.
Download at https://visualstudio.microsoft.com/downloads/.
Please install the "Desktop development with C++" workload, including all of its default components

我重新安装了,不知道为什么一直没有安装!

知道怎么解决吗?

谢谢

最佳答案

来自您的图片;你正在使用 Visual Studio Code , 不是 Visual Studio .

Flutter 2.10 稳定支持构建 Windows 应用程序,for more .

因此,在运行 flutter doctor 时,您会看到此错误。如果您计划构建 Windows 应用程序,则需要安装 Visual Studio 使用 C++ 进行桌面开发。您需要下载并安装Visual studio如果你想消除这个错误。

您可以阅读有关为窗口构建的更多信息 here .

关于windows - 无法在 MS VS 代码上运行 flutter 命令,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70997410/

相关文章:

windows - 发送到多播目的地的 UDP 数据包通过环回接口(interface)发送

android - 在Flutter FireBase中,Google Sign如何为我的给定代码维护持久性标志

c++ - 我可以对同一项目中的某些文件使用不同的 .clang_format 吗?

c++ - 程序如何获取自身的可执行文件名?

windows - Windows 将其 "Open With"设置存储在哪里?

windows - Docker Windows - 在 bash 位置寻找 Ubuntu 命令

c++ - 为什么 rand() 编译时不包含 cstdlib 或使用命名空间 std?

flutter - 基于用户输入的动态 TextField 宽度

image - Flutter图像内存未得到gc

python - 如何使用 Python.h 文件来制作 python C 扩展