flutter doctor(dart on your path resolves to…)
以下のWarningを解決しましょう…
❯ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.24.1, on macOS 14.6.1 23G93 darwin-arm64, locale ja-JP)
! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/2.18.4/libexec/bin/dart, which is not inside your current Flutter SDK checkout at
/Users/xxxx/xxxx/flutter. Consider adding /Users/xxxx/xxxx/flutter/bin to the front of your path.
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.90.2)
[✓] Connected device (3 available)
[✓] Network resources
vi .zshrc
環境変数の変更
# 変更前
export PATH="$PATH:/Users/xxxx/xxxx/flutter/bin"
# 変更後
export PATH="/Users/xxxx/xxxx/flutter/bin:$PATH"
再読み込み
source ~/.zshrc
これで,,,
❯ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.1, on macOS 14.6.1 23G93 darwin-arm64, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.90.2)
[✓] Connected device (3 available)
[✓] Network resources