環境構築編 #1
前提
- Windows11
- FlutterSDKを別プロジェクト用にDL済み
- AndroidStudioをインストール済み
- VSCodeセットアップ済み
手順
- プロジェクト用フォルダを作成 on ファイルエクスプローラー
- FlutterSDKのファイル一式を別プロジェクトからコピーしてくる
- コマンドプロンプトで
flutter doctor→ チェック項目が出ます
こんな感じ
C:\Users\xxxxx>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 3.35.3, on Microsoft Windows [Version 10.0.26100.6725], locale ja-JP)
[√] Windows Version (11 Pro 64-bit, 24H2, 2009)
[!] Android toolchain - develop for Android devices (Android SDK version 36.1.0-rc1)
X cmdline-tools component is missing.
Try installing or updating Android Studio.
Alternatively, download the tools from https://developer.android.com/studio#command-line-tools-only and make sure
to set the ANDROID_HOME environment variable.
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/to/windows-android-setup for more details.
[√] Chrome - develop for the web
[X] Visual Studio - develop Windows apps
X 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 2025.1.3)
[√] VS Code (version 1.103.2)
[√] Connected device (3 available)
[√] Network resources
! Doctor found issues in 2 categories.
- Android studioをアップデートしろと言われるものの、Android studioを起動して確認しても最新なので、普通に
cmdline-tools componentだけ入ってない
まずAndroidSDKのありかを探す
AndroidStudioを開いて三→Settings→ここ↓

このパスを環境変数に設定
こんな感じで環境変数は入れたものの、そのディレクトリ直下に明らかにcmdline-toolsがない
%ANDROID_HOME%\platform-tools
%ANDROID_HOME%\cmdline-tools\latest\bin ←ない
%ANDROID_HOME%\tools ←ない
%ANDROID_HOME%\tools\bin ←ない
多分ドクターの言う通り
Alternatively, download the tools from https://developer.android.com/studio#command-line-tools-only and make sure
to set the ANDROID_HOME environment variable.
しなければならない。
続きは次回
