无法找到 tools.jar

huangapple go评论137阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2020年9月18日 01:23:02
  • 转载请务必保留本文链接:https://go.coder-hub.com/63943222.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定