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?

VSCodeでFlutterをはじめるときにxcrunがerrorしたら

Posted at

塵芥以下のメモ書きです

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

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?