Open9

flutterメモ

kentamakentama

以下のコマンドでflutterに必要なものが揃ってるかチェック

flutter doctor

Android系がNG

Running "flutter pub get" in flutter_tools...                      10.0s
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.4, on macOS 12.3.1 21E258 darwin-arm, locale ja-JP)
[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed
      instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[✓] Xcode - develop for iOS and macOS (Xcode 13.3)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2021.3.3)
[✓] VS Code (version 1.66.2)
[✓] Connected device (1 available)
[✓] HTTP Host Availability

! Doctor found issues in 2 categories.
kentamakentama

Android Studioインストールして再度flutter doctorしてもnot installed

kentamakentama

Android Studioを起動して何か設定したらちょっと変わった

kentamakentama

IntelliJのプラグインでFlutterをインストール
Dartもインストールされる

kentamakentama

これではダメだった

which flutter
/opt/homebrew/bin/flutter
kentamakentama

flutter doctor -vで出てくるpathを指定したらOKだった

バージョン上がったら都度変えないといけない?

flutter doctor -v
[] Flutter (Channel stable, 2.10.4, on macOS 12.3.1 21E258 darwin-arm, locale ja-JP)
    • Flutter version 2.10.4 at /opt/homebrew/Caskroom/flutter/2.10.4/flutter
...