Jans的BLOG
Jans的BLOG

在Windows上,运行Flutter闪退,后来先运行cmd,再运行Flutter,发现提示

Unable to find git in your PATH. 

但是明明git就可以访问的,出现此原因其实目前Flutter目录是git无权访问

在Flutter目录下执行git status

提示:

fatal: detected dubious ownership in repository at 'D:/flutter'
'D:/flutter' is owned by:
'S-1-5-32-544'
but the current user is:
'S-1-5-21-3692714792-1416469238-2434195209-20124'
To add an exception for this directory, call:

git config --global --add safe.directory D:/flutter

在目录下执行

git config --global --add safe.directory D:/flutter

再执行flutter问题解决。

posted on 2023-10-11 13:27  Jans  阅读(170)  评论(0编辑  收藏  举报