I get this error while executing
react-native run-android
I have tried copying tools.jar file to JRE installation location, reinstalled JD
For MacOS, here are the steps:
$ java -version java version "1.8.0_271" Java(TM) SE Runtime Environment (build 1.8.0_271-b09) Java HotSpot(TM) 64-Bit Server VM (build 25.271-b09, mixed mode)
$ cd /Library/Java/JavaVirtualMachines $ ll total 0 drwxr-xr-x 3 root wheel 96B 24 Out 09:24 adoptopenjdk-15-openj9.jre drwxr-xr-x 3 root wheel 96B 30 Dez 20:18 jdk1.8.0_271.jdk
$ cd jdk1.8.0_271.jdk/Contents/Home
$ pwd | pbcopy
org.gradle.java.home=<path_to_current_java_home>
Her is an working example:
Add this to gradle.properties:
org.gradle.java.home=C:\\Program Files\\Java\\jdk1.8.0_91
Don’t forget to use double back slashes. For example:
org.gradle.java.home=C:\\Program Files\\Java\\jdk1.8.0_144\