0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Flutter環境アップデート(2.2.3 → 3.0.0:Windows)

Posted at

Flutterのversion3が出たよ、というニュースを見掛けたので、脊髄反射で自分のWindows環境をアップデートしてみました。

現在のバージョンを確認

>where flutter dart
C:\flutter\bin\flutter
C:\flutter\bin\flutter.bat
C:\flutter\bin\dart
C:\flutter\bin\dart.bat
>flutter -v
  ╔════════════════════════════════════════════════════════════════════════════╗
  ║ A new version of Flutter is available!                                     ║
  ║                                                                            ║
  ║ To update to the latest version, run "flutter upgrade".                    ║
  ╚════════════════════════════════════════════════════════════════════════════╝
# upgradeしなよ、というお知らせが出ている

Manage your Flutter app development.

Common commands:

  flutter create <output directory>
    Create a new Flutter project in the specified directory.

  flutter run [options]
    Run your Flutter application on an attached device or in an emulator.

Usage: flutter <command> [arguments]

Global options:
-h, --help                      Print this usage information.
-v, --verbose                   Noisy logging, including all shell commands executed.
                                If used with "--help", shows hidden options. If used with "flutter
                                doctor", shows additional diagnostic information. (Use "-vv" to
                                force verbose logging in those cases.)
    --prefixed-errors           Causes lines sent to stderr to be prefixed with "ERROR:".
    --quiet                     Reduce the amount of output from some commands.
    --[no-]wrap                 Toggles output word wrapping, regardless of whether or not the
                                output is a terminal.
                                (defaults to on)
    --wrap-column               Sets the output wrap column. If not set, uses the width of the
                                terminal. No wrapping occurs if not writing to a terminal. Use
                                "--no-wrap" to turn off wrapping when connected to a terminal.
-d, --device-id                 Target device id or name (prefixes allowed).
    --version                   Reports the version of this tool.
    --machine                   When used with the "--version" flag, outputs the information using
                                JSON.
    --[no-]color                Whether to use terminal colors (requires support for ANSI escape
                                sequences).
                                (defaults to on)
    --[no-]version-check        Allow Flutter to check for updates when this command runs.
                                (defaults to on)
    --suppress-analytics        Suppress analytics reporting when this command runs.
    --packages                  Path to your "package_config.json" file.

Local build selection options (not normally required):
    --local-engine-src-path     Path to your engine src directory, if you are building Flutter
                                locally.
                                Defaults to $FLUTTER_ENGINE if set, otherwise defaults to the path
                                given in your pubspec.yaml dependency_overrides for sky_engine, if
                                any.
    --local-engine              Name of a build output within the engine out directory, if you are
                                building Flutter locally.
                                Use this to select a specific version of the engine if you have
                                built multiple engine targets.
                                This path is relative to "--local-engine-src-path" or
                                "--local-engine-src-out" (q.v.).

Options for testing the "flutter" tool itself:
    --show-test-device          List the special "flutter-tester" device in device listings. This
                                headless device is used to test Flutter tooling.
    --show-web-server-device    List the special "web-server" device in device listings.

Available commands:
  analyze           Analyze the project's Dart code.
  assemble          Assemble and build Flutter resources.
  attach            Attach to a running app.
  bash-completion   Output command line shell completion setup scripts.
  build             Build an executable app or install bundle.
  channel           List or switch Flutter channels.
  clean             Delete the build/ and .dart_tool/ directories.
  config            Configure Flutter settings.
  create            Create a new Flutter project.
  daemon            Run a persistent, JSON-RPC based server to communicate with devices.
  devices           List all connected devices.
  doctor            Show information about the installed tooling.
  downgrade         Downgrade Flutter to the last active version for the current channel.
  drive             Run integration tests for the project on an attached device or emulator.
  emulators         List, launch and create emulators.
  format            Format one or more Dart files.
  gen-l10n          Generate localizations for the current project.
  install           Install a Flutter app on an attached device.
  logs              Show log output for running Flutter apps.
  precache          Populate the Flutter tool's cache of binary artifacts.
  pub               Commands for managing Flutter packages.
  run               Run your Flutter app on an attached device.
  screenshot        Take a screenshot from a connected device.
  symbolize         Symbolize a stack trace from an AOT-compiled Flutter app.
  test              Run Flutter unit tests for the current project.
  upgrade           Upgrade your copy of Flutter.

Run "flutter help <command>" for more information about a command.
Run "flutter help -v" for verbose help output, including less commonly used options.
>flutter --version
Flutter 2.2.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f4abaa0735 (11 months ago) • 2021-07-01 12:46:11 -0700
Engine • revision 241c87ad80
Tools • Dart 2.13.4

Flutterは2.2.3だったみたいですね。

アップデート(Upgrade)する

アップデートコマンドを指示通りに入力してエンターキーを押下。

>flutter upgrade
Upgrading Flutter to 3.0.0 from 2.2.3 in C:\flutter...
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine d1b9a6938ad77326ac3a94d92bbc77933ed829ed...
Expanding downloaded archive...
Building flutter tool...
Running pub upgrade...

Upgrading engine...
Downloading Material fonts...                                      441ms
Downloading android-arm-profile/windows-x64 tools...               428ms
Downloading android-arm-release/windows-x64 tools...               425ms
Downloading android-arm64-profile/windows-x64 tools...             354ms
Downloading android-arm64-release/windows-x64 tools...             418ms
Downloading android-x64-profile/windows-x64 tools...               411ms
Downloading android-x64-release/windows-x64 tools...               306ms
Downloading android-x86 tools...                                 1,303ms
Downloading android-x64 tools...                                 1,128ms
Downloading android-arm tools...                                 1,164ms
Downloading android-arm-profile tools...                           370ms
Downloading android-arm-release tools...                           280ms
Downloading android-arm64 tools...                               1,084ms
Downloading android-arm64-profile tools...                         463ms
Downloading android-arm64-release tools...                         261ms
Downloading android-x64-profile tools...                           602ms
Downloading android-x64-release tools...                           377ms
Downloading android-x86-jit-release tools...                       567ms
Downloading Web SDK...                                           2,628ms
Downloading CanvasKit...                                         1,989ms
Downloading package sky_engine...                                  160ms
Downloading flutter_patched_sdk tools...                           379ms
Downloading flutter_patched_sdk_product tools...                   273ms
Downloading windows-x64 tools...                                    3.4s
Downloading windows-x64/windows-x64-flutter tools...                5.1s
Downloading windows-x64/flutter-cpp-client-wrapper tools...        176ms
Downloading windows-x64-profile/windows-x64-flutter tools...      2,543ms
Downloading windows-x64-release/windows-x64-flutter tools...      2,543ms
Downloading windows-x64/font-subset tools...                       221ms

Flutter 3.0.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ee4e09cce0 (5 days ago) • 2022-05-09 16:45:18 -0700
Engine • revision d1b9a6938a
Tools • Dart 2.17.0 • DevTools 2.12.2

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.0.0, on Microsoft Windows [Version 10.0.18363.1556], locale ja-JP)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.7)
[√] Android Studio (version 2021.1)
[√] IntelliJ IDEA Community Edition (version 2021.3)
[√] IntelliJ IDEA Ultimate Edition (version 2022.1)
[√] VS Code, 64-bit edition (version 1.67.0)
[√] Connected device (3 available)
[√] HTTP Host Availability

! Doctor found issues in 1 category.

  ╔════════════════════════════════════════════════════════════════════════════╗
  ║                 Welcome to Flutter! - https://flutter.dev                  ║
  ║                                                                            ║
  ║ The Flutter tool uses Google Analytics to anonymously report feature usage ║
  ║ statistics and basic crash reports. This data is used to help improve      ║
  ║ Flutter tools over time.                                                   ║
  ║                                                                            ║
  ║ Flutter tool analytics are not sent on the very first run. To disable      ║
  ║ reporting, type 'flutter config --no-analytics'. To display the current    ║
  ║ setting, type 'flutter config'. If you opt out of analytics, an opt-out    ║
  ║ event will be sent, and then no further information will be sent by the    ║
  ║ Flutter tool.                                                              ║
  ║                                                                            ║
  ║ By downloading the Flutter SDK, you agree to the Google Terms of Service.  ║
  ║ Note: The Google Privacy Policy describes how data is handled in this      ║
  ║ service.                                                                   ║
  ║                                                                            ║
  ║ Moreover, Flutter includes the Dart SDK, which may send usage metrics and  ║
  ║ crash reports to Google.                                                   ║
  ║                                                                            ║
  ║ Read about data we send with crash reports:                                ║
  ║ https://flutter.dev/docs/reference/crash-reporting                         ║
  ║                                                                            ║
  ║ See Google's privacy policy:                                               ║
  ║ https://policies.google.com/privacy                                        ║
  ╚════════════════════════════════════════════════════════════════════════════╝

無事にアップデートされました。
バージョンも確認。

>flutter --version
Flutter 3.0.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision ee4e09cce0 (5 days ago) • 2022-05-09 16:45:18 -0700
Engine • revision d1b9a6938a
Tools • Dart 2.17.0 • DevTools 2.12.2
0
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?