英文:
Could not find tools.jar
问题
在运行 npx react-native run-android
后,我遇到了这个错误:
- 出现了什么问题:
任务:unimodules-constants-interface:compileDebugJavaWithJavac
执行失败。
找不到 tools.jar。请检查 C:\Program Files\Java\jre1.8.0_261 是否包含有效的 JDK 安装。
有人可以解释一下出了什么问题吗?
英文:
After running npx react-native run-android
I am getting this error
* 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.
Can anybody please explain what is wrong in this?
答案1
得分: 0
似乎正在寻找JDK,而您正在指向JRE。您是否安装了JDK?如果是这样,可以尝试指向该JDK。
英文:
Looks like it's looking for a JDK while you're pointing to a JRE. Do you have an installed JDK? If so, maybe try pointing to that.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论