首页 > 解决方案 > 为什么 Flutter 在 Windows 上不再被识别以及如何修复它?

问题描述

在过去的 4 周里,我一直在 Windows 上学习颤振开发,直到突然我的 Visual Studio 通知我它在我的 PC 上找不到颤振包。

我检查了控制台,令人惊讶的是,命令“flutter”不再被识别,不仅在 cmd.exe 中,甚至在 flutter_console.bat 中。路径变量仍然很好,颤动的位置没有改变。

flutter_console.bat

有什么想法会发生什么以及如何解决?

标签: windowsflutterpathconsole

解决方案


*From the Start search bar, enter ‘env’ and select Edit environment variables for your account.
Under User variables check if there is an entry called Path:
    If the entry exists, append the full path to flutter\bin using ; as a separator from existing values.
    If the entry doesn’t exist, create a new user variable named Path with the full path to flutter\bin as its value.

请注意,您必须关闭并重新打开任何现有的控制台窗口才能使这些更改生效*然后运行flutter doctorflutter upgrade


推荐阅读