关于 flutter upgrade时报错

问题

使用指令运行 flutter upgrade 更新flutter版本时报以下错误

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.

解决方案
  1. 先执行flutter channel dev命令,切换至开发版
  2. 再执行 flutter upgrade 命令即可更新

猜你喜欢

转载自blog.csdn.net/qq_22255311/article/details/113767562