0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

AndroidアプリMVP開発 flutter Windows

0
Posted at

環境構築編 #1

前提

  • Windows11
  • FlutterSDKを別プロジェクト用にDL済み
  • AndroidStudioをインストール済み
  • VSCodeセットアップ済み

手順

  1. プロジェクト用フォルダを作成 on ファイルエクスプローラー
  2. FlutterSDKのファイル一式を別プロジェクトからコピーしてくる
  3. コマンドプロンプトで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.
  1. Android studioをアップデートしろと言われるものの、Android studioを起動して確認しても最新なので、普通に
    cmdline-tools componentだけ入ってない

まずAndroidSDKのありかを探す
AndroidStudioを開いて三→Settings→ここ↓
image.png

このパスを環境変数に設定

image.png

こんな感じで環境変数は入れたものの、そのディレクトリ直下に明らかに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.

しなければならない。

続きは次回

0
0
0

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
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?