新生活が始まり、必要が出てきたのでFlutterデビューすることに。
今までAndroid Studioは使っていたのでこちらでやってみよう…
▼基本的な流れ
docs.flutter.dev
Android Studio
現在は2024.3.1 Patch 1 "Meerkat"がメインでDLできるようで
ひとまずおすすめされたものを選んでおこう
▼公式サイト
developer.android.com
Windowsの機能
エミュレータを使えるよう項目のチェックを外す
その間も起動まで結構時間がかかるので、この後使うものを今のうちにDLしておくのが好し
プラグイン
SDK Tools
Git
Flutterを使うには最低v2.27、特に考えず最新版をDLしておこう
▼公式サイト
gitforwindows.org
インストール時のオプションは調べると沢山出てくるよ
バージョンが確認できたらOK
git --version
Flutter
▼公式サイト
docs.flutter.dev
DLしたzipの中身をお好きな場所に展開
環境変数を編集
先程展開したフォルダ内にあるbinのパスをユーザー環境変数>Pathに新規で追加
Androidライセンス
プロンプトを再起動しコマンドを実施
flutter doctor
足りない要素を教えてくれる便利コマンドです
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.29.3, on Microsoft Windows [Version 10.0.26100.3775], locale ja-JP) [✓] Windows Version (Windows 11 or higher, 24H2, 2009) [!] Android toolchain - develop for Android devices (Android SDK version 35.0.1) ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses [✗] Chrome - develop for the web (Cannot find Chrome executable at .\Google\Chrome\Application\chrome.exe) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [✗] Visual Studio - develop Windows apps ✗ Visual Studio not installed; this is necessary to develop Windows apps. Download at https://visualstudio.microsoft.com/downloads/. Please install the "Desktop development with C++" workload, including all of its default components [✓] Android Studio (version 2024.3) [✓] Connected device (2 available) [✓] Network resources
Android toolchain、Chrome、Visual Studioの準備ができてないよーとのこと
flutter doctor --android-licenses
以下の文章が表示されればOK
All SDK package licenses accepted.
プロジェクトを作る
Flutterのフォルダを選択して作成
アプリとして起動できればいいのでひとまず変更かけず起動しよう
エミュレータで無事起動
これにてFlutter開発環境の構築が完了