在Windows 10中找不到tools.jar React Native Android [英] Could not find tools.jar React Native Android In windows 10

查看:80
本文介绍了在Windows 10中找不到tools.jar React Native Android的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们.我只是试图在我的笔记本电脑上安装本机反应.我已经按照所有设置说明进行操作,但我还是收到了这些错误提示.

guys . i just try to install react native in my laptop. i've followed all setup instruction but i stiil get those error .

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Could not find tools.jar

我在os版本5.1.0中使用了genymotion,我已经为android_home设置了环境变量.知道我在这里想念什么吗?

i used genymotion with os version 5.1.0, i've setup environment variable for android_home. Any idea what i miss here ?

推荐答案

设置缺少的"JAVA_HOME"系统环境变量对我有用.

Setting the missing "JAVA_HOME" system environment variable worked for me.

  • 在键盘上按WIN +暂停.
  • 单击高级系统设置.
  • 点击环境变量".
  • 单击系统变量"下的新建".
  • 变量名称字段中输入"JAVA_HOME".
  • Value 字段中输入J​​DK的路径.对我来说正确的道路短文件名是"C:\ PROGRA〜1 \ Java \ jdk1.8.0_66".您的路径将取决于安装的版本.
  • 单击确定",然后在上一个窗口中也单击确定".
  • 重新启动任何命令提示符或重新启动计算机.
  • 之后,
  • react-native run-android 工作正常.
  • Press WIN+Pause on keyboard.
  • Click advanced system settings.
  • Click "Environment variables".
  • Click "New" under "System variables".
  • Type "JAVA_HOME" in the Variable name field.
  • Type the path to the JDK in the Value field. For me the correct path with short filename was "C:\PROGRA~1\Java\jdk1.8.0_66". Your path will vary depending on the installed version.
  • Click OK, and OK in previous window too.
  • Restart any command prompts or restart the computer.
  • react-native run-android worked fine after that.

这篇关于在Windows 10中找不到tools.jar React Native Android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆