[Flutter]flutter upgradeができなかった

スポンサーリンク

環境

Windows 10
Flutter 1.12.13+hotfix.5
Android Studil 3.5.3

背景

ライブラリをpubspec.yamlのdependenciesに追加して、Packages get を実施したところ、flutter upgradeを行う必要があるようなメッセージが表示されました。
そして、flutter upgradeを実行したところ、さらに
以下のエラーメッセージが出力されました。

エラーメッセージ

c:\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.

解決手順

c:\flutter>git stash save
Saved working directory and index state WIP on stable: 27321ebba v1.12.13+hotfix.5 cherry-picks (#46726)

c:\flutter>git checkout .
Updated 0 paths from the index

解決後、アップグレード

>flutter upgrade
Upgrading Flutter from C:\flutter...
From https://github.com/flutter/flutter
   370c4b64b..a6fd091b3  DaveShuckerow-patch-1 -> origin/DaveShuckerow-patch-1
   bc6f270c5..c88320458  dev                   -> origin/dev
   f34bb03d8..ec1044a87  master                -> origin/master
 * [new tag]             v1.14.1               -> v1.14.1
Updating cf37c2cd0..27321ebba
 24 files changed, 651 insertions(+), 218 deletions(-)
Flutter is already up to date on channel stable
Flutter 1.12.13+hotfix.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 27321ebbad (6 weeks ago) • 2019-12-10 18:15:01 -0800
Engine • revision 2994f7e1e6
Tools • Dart 2.7.0

コメント

タイトルとURLをコピーしました