VS Code 中 Flutter Daemon 启动失败并出现 Unable to find Git in your path 错误

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

我在 VS Code 中使用 Flutter 时遇到问题。当我在正常模式下打开我的项目时,我收到以下错误消息:

The Flutter Daemon failed to start.

当我尝试运行任何命令(例如

flutter pub get
)时,我收到此错误:

Unable to find the git in your path.

但是,如果我在管理员模式下打开 VS Code,一切正常,并且不会出现错误。

操作系统:Windows_NT x64 10.0.22631

VS代码版本:1.94.2

Node.js:20.16.0

颤振3.24.3

Dart SDK版本:3.5.3

git 版本 2.43.0.windows.1

我已经尝试在setting.json中手动编写gitpath,但它不起作用。

我已尝试重新安装我的 vs code,但仍然存在同样的问题。

flutter git visual-studio-code path configuration
1个回答
0
投票

我认为您错过了向系统添加颤动路径

将 flutter bin 路径添加到您的路径中在系统变量下 只需打开“编辑环境变量”窗口 在系统变量下找到键值对键名Path 编辑它并通过你的 flutter bin 路径

不仅仅是重新启动系统

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