Flutterバージョンのアップグレード

午前中にプロジェクトを作成するためのヒント

  ╔════════════════════════════════════════════════════════════════════════╗
  ║ A new version of Flutter is available!                                 ║
  ║                                                                        ║
  ║ To update to the latest version, run "flutter upgrade".                ║
  ╚════════════════════════════════════════════════════════════════════════╝

注文の実行

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.

プロンプトに従って再実行します

flutter upgrade --force

促す

ProcessException: Process exited abnormally:
fatal: unable to access 'https://github.com/flutter/flutter.git/': Failed to
connect to github.com port 443: Operation timed out
  Command: git fetch --tags

解決策を探す

https://blog.csdn.net/natahew/article/details/81387885
https://blog.csdn.net/qq_43827595/article/details/106547339

他の人はホストファイルを変更することでそれを解決できるようです

変更する前に再試行してください

flutter upgrade --force

アップグレードが成功したことを示すプロンプト

Downloading darwin-x64-release/FlutterMacOS.framework tools...      1,885ms
Downloading darwin-x64-release tools...                            780ms
Downloading darwin-x64/font-subset tools...                      1,040ms

Flutter 2.0.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 4d7946a68d (8 days ago) • 2021-03-18 17:24:33 -0700
Engine • revision 3459eb2436
Tools • Dart 2.12.2

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.0.3, on macOS 11.2.3 20D91 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 4.0)
[✓] IntelliJ IDEA Ultimate Edition (version 2019.3.1)
[✓] VS Code (version 1.54.3)
[✓] Connected device (3 available)

• No issues found!

おすすめ

転載: blog.csdn.net/qiang2080/article/details/115258911