Hi today I've upgrade my MacBook to macOS Big Sur version 11.0.1. Now there is a problem coming out.
* What went wrong:
Execution failed for task ':apple_sign_in:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.
Anyone know how to solve this issue ? Thanks.
I had the same problem and fixed it like this: Install the JDK from the Oracle website with the same version number as the JRE if you didn't already. Furthermore add JAVA_HOME to the environment variables of Windows. Restart your terminal or development environment to load the new JAVA_HOME value.
THREAD CLOSED
I'm a Mac user. I've found the solution by using this method.
// Example
org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home
Possible duplicate of https://stackoverflow.com/a/64864365/2405040.
You should not alter gradle.properties
manually. Try setting your JAVA_HOME
in ~/.bash_profile
to something like-
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
then relaunch a terminal session or run
source ~/.bash_profile
If you are using Zsh/Oh-My-Zsh, add the above with file ~/.zshrc
and then reload the same or relaunch the terminal-
source ~/.zshrc
I can't comment, but here's a macOS one-liner based on the other answers if you use ZSH (Catalina+ default). No need to install Java from Oracle.
echo 'export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"' >> ~/.zshrc && source ~/.zshrc
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With