본문 바로가기
Android/Build Error

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

by Jay Son 아기 냥이 해린 짱💖 2021. 1. 10.

 

./gradlew assembleMinApi21Release
json@JSonui-MacPro UIMiddleware % ./gradlew assembleMinApi21Release
> Task :app:compileMinApi21ReleaseJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileMinApi21ReleaseJavaWithJavac'.
> Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

 

 

javac -version
json@JSonui-MacPro JavaVirtualMachines % javac -version
The operation couldn’t be completed. Unable to locate a Java Runtime that supports javac.
Please visit http://www.java.com for information on installing Java.

 

www.oracle.com/java/technologies/javase-downloads.html

 

 

반응형