flutter upgrade
or flutter upgrade --force
fails with WriteError
due to error running Rename-Item $dartSdkPath "$oldDartSdkPrefix$oldDartSdkSuffix"
#147357
Labels
r: duplicate
Issue is closed as a duplicate of an existing issue
When trying to upgrade flutter installation (all flavours, Stable, Beta and Main) using
flutter upgrade
orflutter upgrade --force
it will fail with followin recursive error:Recovering from this error isn't always easy, but I have found following to be successful:
flutter clean
in terminal: Note the clean process may never end. Click Ctrl-C.flutter pub get
flutter doctor -v
flutter channel
just to confirm that your channel is set.flutter upgrade
to confirm that your version level is set.flutter pub upgrade
orflutter pub upgrade --major-versions
to be sure.I hope I'm not the only one experiencing this, and it happens in every project I have.
The text was updated successfully, but these errors were encountered: