1
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?

More than 1 year has passed since last update.

Flutter側でXcodeのバージョンを切り替える方法

Last updated at Posted at 2023-11-24

環境確認

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.6, on macOS 13.5.1 22G90 darwin-arm, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 15.0.1)
[✓] Chrome - develop for the web
[!] Android Studio (version 2022.3)
    ✗ Unable to find bundled Java version.
[!] Android Studio (version 2022.2)
    ✗ Unable to find bundled Java version.
[✓] VS Code (version 1.84.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

! Doctor found issues in 2 categories.

ゴール

Xcode15.0.1 -> Xcode14.3.1 へ変更したい

前提

バージョンが異なるXcodeが二つ以上インストールされていること

本記事のXcodeのパス

Xcode 15.0.1のパス

/Applications/Xcode.app/Contents/Developer

Xcode 14.3.1のパス

/Applications/Xcode14.app/Contents/Developer

手順

  1. 使用しているXcodeのパスを確認
$ xcode-select --print-path 
/Applications/Xcode.app/Contents/Developer

※ 基本的に異なるバージョンでインストールされたXcodeは同じパスにあるので設定したいXcodeのバージョンのパスは以下のように確認できます

ls /Applications/

2. 使用したいXcodeのバージョンを選択

$ sudo xcode-select -switch /Applications/Xcode.app

3. もう一度設定が反映された確認

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.6, on macOS 13.5.1 22G90 darwin-arm, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[!] Android Studio (version 2022.3)
    ✗ Unable to find bundled Java version.
[!] Android Studio (version 2022.2)
    ✗ Unable to find bundled Java version.
[✓] VS Code (version 1.84.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

! Doctor found issues in 2 categories.
1
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
1
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?