DEV Community

Larry
Larry

Posted on

Could not find tools.jar

Alt Text

Problem:
Execution failed for task ':react-native-gesture-handler:compileDebugJavaWithJavac'.

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

Solution:

  1. Go to your project, open android folder > gradle.properties file > add below line org.gradle.java.home=/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home // path to JDK
  2. run your project again react-native run-android

Thanks

Top comments (5)

Collapse
 
deep7777 profile image
Deepak Yadav

Thanks

Collapse
 
rlesniak profile image
Rafal Lesniak

Thanks!

Collapse
 
lautaroml profile image
Lautaro

Thanks!!!

Collapse
 
akpughe profile image
David Akpughe

Thanks!!

Collapse
 
waldemirflj profile image
Waldemir Francisco

Nice!