LoginSignup
0
0

More than 1 year has passed since last update.

Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.

Posted at

しばらく開発していなかったAndroidアプリが以下のエラーでビルドできなくなってしまいました。

Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.

Stackoverflow によると Big sur に更新後に発生する様子。

ちなみに私の環境は2番目の回答のような2つのJava環境がある(?はっきりわかってない)状態でした。

$ /usr/libexec/java_home -V | grep jdk
Matching Java Virtual Machines (2):
    1.8.181.13 (x86_64) "Oracle Corporation" - "Java" /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
    1.8.0_181 (x86_64) "Oracle Corporation" - "Java SE 8" /Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home

対処方法は下の方のパスをJAVA_HOMEとして環境変数に設定する方法が有効でした。

~/.bash_profile
# 以下追記
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home
0
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
0
0