2
1

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 doctorのandroid-licensesでJDK 17のエラーが出た場合

Posted at

環境

Flutter 2.10.5
Android Studio Bumblebee | 2021.1.1 Patch 2
ちょっと古い環境のようであまり記事がなかった。

エラー

flutter doctor --android-licenses

This tool requires JDK 17 or later. Your version was detected as 11.0.11.
To override this check, set SKIP_JDK_VERSION_CHECK.

対応

ローカルのJDKを17に更新する
Android Studio側はJDK11で動く模様。

brew install openjdk@17

~/.zshrcに下記追加
export JAVA_HOME=/usr/local/opt/openjdk@17
export PATH=$JAVA_HOME/bin:$PATH

source ~/.zshrc

結果

無事ライセンス認証フローに移れば成功です。

余談

環境をひと通り新しくしたいです。
Android開発やFlutter開発を積極的に行っていく。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?