为什么当我在 cmd (windows) 中输入 dart 时它会立即关闭?与 flutterfire 相同

问题描述 投票:0回答:1

最近不小心把“path”(环境变量)整个文件给删了,可能是少了一些变量吧 这是我的扑救医生:

[√] Flutter (Channel master, 3.8.0-14.0.pre.8, in Microsoft Windows [version 10.0.19044.2604],     localization ru-RU)
[√] Windows version (installed version of Windows - version 10 or higher)
[√] Android toolchain - development for Android devices (Android SDK version 32.1.0-rc1)
[√] Chrome - development for the Internet
[!] Visual Studio - development for Windows (Visual Studio Community 2022 17.4.3)
X Visual Studio lacks the necessary components. Please re-run the Visual Studio installer for the                   "Desktop Development using C++" workload and enable these components:
MSVC v142 - VS 2019 C++ x64/x86 Build Tools
- If multiple versions of the build tool are available, install the latest one
C++ CMake Tools for Windows
Windows 10 SDK
[√] Android Studio (version 2021.2)
[√] Android Studio (version 4.1)
[√] VS Code (version 1.75.1)
[√] Connected device (available 3)
[√] Network resources

看起来没问题,但是当我写到控制台时,“dart...”或“flutterfire...”或只是“dart”立即关闭 没有错误。

**[这里是我的system环境变量PATH](https://i.stack.imgur.com/kQixu.png)

[这里是我的user环境变量PATH](https://i.stack.imgur.com/RZvdH.png)

我试图重新安装 flutter sdk,但它没有帮助(

flutter firebase dart cmd
1个回答
0
投票

我通过将此路径添加到系统环境变量中解决了这个问题

C:\Program Files\Git\cmd

© www.soinside.com 2019 - 2024. All rights reserved.