美文网首页
Your flutter checkout has local

Your flutter checkout has local

作者: 镌刻心语 | 来源:发表于2020-12-15 09:16 被阅读0次

在升级Flutter SDK时可能会报如下错误:

Your flutter checkout has local changes that would be erased by upgrading. If you want to keep these changes, it is recommended that you stash them via “git stash” or else commit the changes to a local branch. If it is okay to remove local changes, then re-run this command with --force.
exit code 1

这个有可能是在下载老版SDK的时候,分支切换到了beta分支上,如果是这种情况只要把分支切换到stable/dev分支 再用flutter upgrade更新就可以了,不过我的情况不太一样,我下载sdk分支就是stable,所以有可能是修改某些配置文件时有冲突导致无法更新,这时可以用git的可视化工具sourcetree查看冲突的内容,直接用它更新flutter sdk项目也是可以的。

相关文章

网友评论

      本文标题:Your flutter checkout has local

      本文链接:https://www.haomeiwen.com/subject/nncrgktx.html