flutter upgrade command: Flutter fails to upgrade with exit code = 1
Try the following:
1- Try flutter clean
before flutter upgrade
.
2- Try flutter upgrade --force
3- If this didn't work, delete flutter and install it again. I struggled for a while with a similar error.
Thorvald
Updated on December 15, 2022Comments
-
Thorvald over 1 year
I am trying to upgrade flutter to the latest version via Visual Studio code's terminal by running
flutter upgrade
command but every time I do it after a while I get the same error message over and over again!This is what I get:
[flutter] flutter upgrade
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
I have already pushed the project to a
GitHub
repository but I don't seem to get what's going on here!Q: How to properly upgrade flutter to the latest version?
-
Thorvald over 4 yearswill that make me lose any files?
-
Karim over 4 yearsAs long as you didn't change in flutter itself nothing should happen.