找不到tools.jar

时间:2020-09-17 17:23:02

标签: java android react-native android-studio

运行npx react-native run-android

之后

我收到此错误

* What went wrong:
Execution failed for task ':unimodules-constants-interface:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that C:\Program Files\Java\jre1.8.0_261 contains a valid JDK installation.

有人可以解释这是什么问题吗?

1 个答案:

答案 0 :(得分:0)

在您指向JRE时,它似乎正在寻找JDK。您是否已安装JDK?如果是这样,也许尝试指向它。