小编Gow*_*hik的帖子

任务“:app:compileDebugJavaWithJavac”执行失败。> 找不到 tools.jar

执行时出现此错误

react-native run-android
Run Code Online (Sandbox Code Playgroud)

我尝试将 tools.jar 文件复制到 JRE 安装位置,重新安装 JDK 和 JRE,检查路径的环境变量。没有任何效果。

它返回以下异常

info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details
> Task :app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that C:\Program Files (x86)\Java\jre1.8.0_211 contains a valid JDK installation …
Run Code Online (Sandbox Code Playgroud)

reactjs react-native react-native-android

6
推荐指数
2
解决办法
3674
查看次数