1
1

【Flutter】flutter doctor --android-licensesが通らない件

Last updated at Posted at 2024-03-24

flutter doctor --android-licensesが通らない件について、
もしエラー内容で同じであれば、参考にしてください!

環境

・MacBook Air (M1)
・macOS Sonoma14.1

エラー内容

java.lang.UnsupportedClassVersionError: 
com/android/sdklib/tool/sdkmanager/SdkManagerCli has been compiled 
by a more recent version of the Java Runtime (class file version 61.0), 
this version of the Java Runtime only recognizes class file versions up to 55.0

解決策

Android Studioを起動後、SDK Managerを開く

image.png

Android SDK Command-line Tools ver.8.0を選択して、「Apply」

(同じエラー内容の場合、ver8.0をダウンロードしないといけないかも)
image.png

再度コマンドを実行

flutter doctor --android-licenses

何回か「y/n」に答えて、下記のように表示されたら成功

10.8 Open Source Software. In the event Open Source software is included with Evaluation Software, such Open Source software is licensed pursuant to the applicable Open Source software license agreement identified in the Open Source software comments in the applicable source code file(s) and/or file header as indicated in the Evaluation Software. Additional detail may be available (where applicable) in the accompanying on-line documentation. With respect to the Open Source software, nothing in this Agreement limits any rights under, or grants rights that supersede, the terms of any applicable Open Source software license agreement.
---------------------------------------
Accept? (y/N): y
All SDK package licenses accepted

Flutterの環境構築苦戦中です…😢

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