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?

Flutter環境構築:M1 MacのAndroidStudio設定でも手こずった話

Posted at

6年前までKotlinをちょこっと(ほんとにちょこっとだけ)勉強してたのですが、
開発をやめてしまったので、AndroidStudioをMacから消していたんです。
だからFlutter環境構築でAndroidStudioを選択するのも「ああ、簡単でしょう」なーんて思っていました。すみません、わたしが舐めていました。こちらでも手こずりました。

手こずった主な原因:cmdline-tools component is missing

flutter doctorをコマンドにいれると
cmdline-tools component is missing
というメッセージが表示されます。

でもchat GPTに聞けばいいか、って安易な発想もまずかった

  • cmdline-toolsコンポーネントが不足しています。このコンポーネントをインストールする必要があります。path/to/sdkmanager --install "cmdline-tools;latest”+
    このコマンドを打っても何の解決にもなりません。

対処した方法は次の通りです

  • Android Studioを立ち上げる。
    Projectの下の「More Actions」をクリック
    Welcome to Android Studio.png

  • リスト表示がでてくるので「SDK Manager」を選択
    New Flutter Project.png

  • 開いた直後は下記のように「SDK Platforms(青い線が引いてある)」が選択されているので、右隣りの「SDK Tools」を選択
    Pasted Graphic 38.png

  • 真ん中あたりに 「Android SDK Platform-Tools」があるので選択。
    (この写真ではすでに選択済みです)
    Pasted Graphic 39.png

  • 変更確認がでてくるのでOKを選択!
    image.png

これが終わったら、flutter doctor をターミナルで入力して、確認・終了。

###参考記事###
Flutter環境構築 on M1 Macにおけるcmdline-tools component is missingへの対処2023
https://zenn.dev/watarungurunnn/articles/7ab04a8a3b4625

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?