
Sudo rm -fr /Library/PreferencePanes/JavaControlPanel. Sudo rm -fr /Library/Internet\ Plug-Ins/ugin There can be multiple JDKs installed on the macOS system. I would recommend fixing this issue fully by first removing the Java you installed by running the following in your terminal: When starting a Java application through the command line, the system uses the default JDK. You then fixed the second error by forcing gradle (build tool) to look in the correct folder for your JDK. When you install Java (JRE) and try build your app, the build now finds Javas JRE which has everything it is needs to run Java but not build it, this is why the new error is Could not find tools.jar… The JDK includes the compiler (javac) and tools (like javadoc and jdb) and is what is needed to build your app. if not reinstall JDK (instructions bellow)


i.e Make sure JAVA_HOME environment variable is set to the JDK’s folder. This could potentially be fixed by simply updating your Java path in your terminals profile (.profile. Either a path issue or another issue with the JDK install. For whatever reason your computer can’t find your installed version of JDK.

I had a similar issue with react native but I think installing Java (JRE) is creating a new problem while partly fixing the original.
