塵芥以下のメモ書きです
Situation
Mac OS 14にて、HomebrewでインストールしたFlutterとVSCodeをつかってFlutter入門しようとしたときの話
より具体的には、サンプルアプリをとりあえずコピペしてlib/main.dart
からデバッグしようとしたとき
Error Message
VSCode Debug Console
Launching lib/main.dart on macOS in debug mode...
ProcessException: Process exited abnormally with exit code 72:
xcrun: error: unable to find utility "xcodebuild", not a developer tool or in PATH
Command: /usr/bin/arch -arm64e xcrun xcodebuild -list -project Runner.xcodeproj
Exited (1).
Solution
shell
flutter doctor -v
これを叩くと何が足りないのか教えてくれる。うちの場合は
[✗] Xcode - develop for iOS and macOS
✗ Xcode installation is incomplete; a full installation is necessary for iOS
and macOS development.
Download at: https://developer.apple.com/xcode/
Or install Xcode via the App Store.
Once installed, run:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
sudo xcodebuild -runFirstLaunch
✗ CocoaPods not installed.
CocoaPods is a package manager for iOS or macOS platform code.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/to/platform-plugins
For installation instructions, see
https://guides.cocoapods.org/using/getting-started.html#installation
このセクションの内容に従っていろいろやると解決した。(Warningはまだ出てるがとりあえずデバッグ用アプリウィンドウは開いたのでヨシ)
refs