【Flutter】flutter doctor --android-licensesが通らない件
flutter doctor --android-licensesが
このflutter doctor --android-licenses がflutter config --jdk-dir で
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を開く
Android SDK Command-line Tools ver.8.0を選択して、「Apply」
(同じ

再度コマンドを実行
flutter doctor --android-licenses(ハイフンは
何回か
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なぜ「class file version 61.0」で止まるのか
エラーの
新しめの
Java version 17 or higher is required. To override this check set SKIP_JDK_VERSION_CHECK上の
Javaの方を17以上に合わせる方法
どのJavaが使われているか確かめる
flutter doctor -vAndroid toolchainのJAVA_HOME、java を
17以上のJavaを指定する
flutter config --jdk-dir=<Java 17以上のフォルダ>Macで/opt/homebrew/Cellar/openjdk@17/17.0.13/libexec/openjdk.jdk/Contents/Home のようなflutter doctor --android-licenses を
「cmdline-tools component is missing」と出る場合
ライセンスより
Flutterをcmdline-tools/latest/bin にある sdkmanager --licenses でも
株式会社bundlyzeでは、
Flutterの
よくある質問
flutter doctor --android-licenses は何をするコマンド?
Android SDKの
「Some Android licenses not accepted」と出たら?
まだflutter doctor --android-licenses を
Windowsでも同じ直し方でよい?
原因flutter doctor -v でflutter config --jdk-dir で