【 Flutter 】Flutter を 基礎 から 学習 ( スタートガイド編 ) part07 環境構築

基礎 から 学ぶ Flutter 」という書籍で  学習 したことを ブログでアウトプットしていこうと思います。今回は スタートガイド編 ( part07 )です。

 

環境構築

Android Studio の設定

 Android Licensesの設定

おお、こんなところで出てきましたか(笑

この設定は前回設定済みなのでスキップしますね。

 

Windows の設定

追加要件

Windowsデスクトップアプリを作成するにはC++のコンポーネントが必要なようです。

必要ないかもしれませんがインストールガイドに記載されているので頑張ってみます。

Visual Studio2019は幸いインストール済みなのでワークロード追加だけでよいでしょうかね。

Visual Studio Installerを起動します。

変更をクリックします。

C++によるデスクトップ開発 を選択します。たぶんこのワークロードですよね😅

ユニバーサル Windows プラットフォーム開発も必要なようです。

変更ボタンをクリックし、待ちます😑

終わったら閉じておきましょう。

 

デスクトップサポート有効化

Flutter SDKの設定のようです。

PS D:\flutter> flutter config --enable-windows-desktop
Setting "enable-windows-desktop" value to "true".

You may need to restart any open editors for them to read new settings.
PS D:\flutter> flutter channel dev
Switching to flutter channel 'dev'...
git: From https://github.com/flutter/flutter
git:  + 615957513e...19c61fed0d beta                    -> origin/beta  (forced update)
git:  + 2b9537c783...225a43d941 dev                     -> origin/dev  (forced update)
git:  * [new branch]            dnfield-patch-1         -> origin/dnfield-patch-1
git:    f4abaa0735..07d2f6f4b1  flutter-2.2-candidate.10 -> origin/flutter-2.2-candidate.10
git:  * [new branch]            flutter-2.4-candidate.1 -> origin/flutter-2.4-candidate.1
git:  * [new branch]            flutter-2.4-candidate.2 -> origin/flutter-2.4-candidate.2
git:  * [new branch]            flutter-2.4-candidate.3 -> origin/flutter-2.4-candidate.3
git:  * [new branch]            flutter-2.4-candidate.4 -> origin/flutter-2.4-candidate.4
git:  * [new branch]            flutter-2.4-candidate.5 -> origin/flutter-2.4-candidate.5
git:  * [new branch]            flutter-2.4-candidate.6 -> origin/flutter-2.4-candidate.6
git:  * [new branch]            flutter-2.4-candidate.7 -> origin/flutter-2.4-candidate.7
git:  * [new branch]            flutter-2.4-candidate.8 -> origin/flutter-2.4-candidate.8
git:  * [new branch]            flutter-2.5-candidate.0 -> origin/flutter-2.5-candidate.0
git:  * [new branch]            flutter-2.5-candidate.1 -> origin/flutter-2.5-candidate.1
git:  * [new branch]            flutter-2.5-candidate.2 -> origin/flutter-2.5-candidate.2
git:  * [new branch]            flutter-2.5-candidate.3 -> origin/flutter-2.5-candidate.3
git:  * [new branch]            flutter-2.5-candidate.4 -> origin/flutter-2.5-candidate.4
git:  * [new branch]            flutter-2.5-candidate.5 -> origin/flutter-2.5-candidate.5
git:  * [new branch]            flutter-2.5-candidate.6 -> origin/flutter-2.5-candidate.6
git:  * [new branch]            flutter-2.5-candidate.7 -> origin/flutter-2.5-candidate.7
git:  * [new branch]            flutter-2.5-candidate.8 -> origin/flutter-2.5-candidate.8
git:  * [new branch]            flutter-2.5-candidate.9 -> origin/flutter-2.5-candidate.9
git:  * [new branch]            flutter-2.6-candidate.0 -> origin/flutter-2.6-candidate.0
git:    52e2ca38fc..ac05e7e3fe  master                  -> origin/master
git:  * [new branch]            pull-87493              -> origin/pull-87493
git:  * [new branch]            revert-86171-revert-83924-textTheme -> origin/revert-86171-revert-83924-textTheme
git:  * [new branch]            revert-86198-deprecate_appbar_backwards_compatibility_flag -> origin/revert-86198-deprecate_appbar_backwards_compatibility_flag
git:  * [new branch]            test                    -> origin/test
git:  * [new branch]            test2                   -> origin/test2
git:  * [new tag]               2.4.0-0.0.pre           -> 2.4.0-0.0.pre
git:  * [new tag]               2.4.0-4.2.pre           -> 2.4.0-4.2.pre
git:  * [new tag]               2.5.0-1.0.pre           -> 2.5.0-1.0.pre
git:  * [new tag]               2.5.0-5.2.pre           -> 2.5.0-5.2.pre
git:  * [new tag]               2.5.0-6.0.pre           -> 2.5.0-6.0.pre
git:  * [new tag]               2.4.0-4.0.pre           -> 2.4.0-4.0.pre
git:  * [new tag]               2.4.0-4.1.pre           -> 2.4.0-4.1.pre
git:  * [new tag]               2.5.0-5.0.pre           -> 2.5.0-5.0.pre
git:  * [new tag]               2.5.0-5.1.pre           -> 2.5.0-5.1.pre
git: Branch 'dev' set up to track remote branch 'dev' from 'origin'.
git: Switched to a new branch 'dev'
Successfully switched to flutter channel 'dev'.
To ensure that you're on the latest build from this channel, run 'flutter upgrade'
PS D:\flutter> flutter upgrade
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine 07ec4b82c71ce2f34c72caeaf061f7ad82cb25e4...
Expanding downloaded archive...
Building flutter tool...
Running pub upgrade...
Flutter is already up to date on channel dev
Flutter 2.5.0-6.0.pre • channel dev • https://github.com/flutter/flutter.git
Framework • revision 225a43d941 (3 weeks ago) • 2021-08-05 11:32:48 -0700
Engine • revision 07ec4b82c7
Tools • Dart 2.14.0 (build 2.14.0-383.0.dev)
PS D:\flutter> flutter config --enable-windows-uwp-desktop
Setting "enable-windows-uwp-desktop" value to "true".

You may need to restart any open editors for them to read new settings.
PS D:\flutter>

無事完了!

 

そのほか

Webのセットアップもあるようなのですが本書を読み進める上ではこのあたりまでで良さそうなので割愛!

本書に戻る

Android Studioにおいてまだ少しやるべきことが残っているようです。

次回はそこから始めることにします。

今日はここまで!