dart 当我在我的Mac PC上运行Flutter升级时,我得到下面的错误

2fjabf4q  于 2023-07-31  发布在  Mac
关注(0)|答案(1)|浏览(155)

当我在我的Mac PC上运行flutter升级时,我得到了下面的错误,请我希望有一个快速的解决方案来加快我的开发过程。我已经看到并尝试类似的错误解决方案在线,但不为我工作

adedoyinolanipekun@ADEDOYINs-MacBook-Pro momaspay % flutter upgrade   
ProcessException: Process exited abnormally:
error: cannot lock ref 'refs/tags/2.8.0-3.3.pre': unable to resolve reference 'refs/tags/2.8.0-3.3.pre': Input/output error
From https://github.com/flutter/flutter
 ! [new tag]               2.8.0-3.3.pre -> 2.8.0-3.3.pre  (unable to update local ref)
error: cannot lock ref 'refs/tags/2.8.1': unable to resolve reference 'refs/tags/2.8.1': reference broken
 ! [new tag]               2.8.1         -> 2.8.1  (unable to update local ref)
error: cannot lock ref 'refs/tags/2.9.0-0.0.pre': unable to resolve reference 'refs/tags/2.9.0-0.0.pre': reference broken
 ! [new tag]               2.9.0-0.0.pre -> 2.9.0-0.0.pre  (unable to update local ref)
  Command: git fetch --tags

字符串
Flutter升级
我期待我的Flutter和 dart sdk更新,但我得到了上面的错误

pu82cl6c

pu82cl6c1#

看来你的本地repo坏了,试试这个:

cd flutter
git clean -xfd
git stash save --keep-index
git stash drop
git pull

字符串
如果问题持续存在,可能是因为更严重的腐败问题。在这种情况下,您可能需要重新克隆Flutter仓库:

cd ..
rm -rf flutter
git clone https://github.com/flutter/flutter.git


然后再将Flutter添加到路径中:

export PATH="$PATH:`pwd`/flutter/bin"

相关问题