【问题标题】:React Native: Error while running the android appReact Native:运行android应用程序时出错
【发布时间】:2019-02-04 00:49:29
【问题描述】:

在 react native 中运行 android 应用程序时出现此错误

任务 ':react-native-contacts:compileDebugJavaWithJavac' 执行失败。

找不到 tools.jar。请检查 C:\Program Files\Java\New 文件夹是否包含有效的 JDK 安装。

我还检查了它安装的 java 版本。我的java版本是1.8.0_151。

【问题讨论】:

  • 你使用react-native-maps 吗?
  • 不,我只是在运行应用程序。
  • 我从github下载

标签: android react-native android-emulator react-native-android


【解决方案1】:

将 Jdk 路径 org.gradle.java.home=C:\\Program Files\\Java\\jdk1.8.0_144 添加到 gradle.properties 文件,然后在项目根目录中运行此命令行

cd android && gradlew clean && cd .. && react-native run-android

【讨论】:

  • 现在我收到此错误任务':app:installDebug'的执行失败。 > com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_UPDATE_INCOMPATIBLE
猜你喜欢
  • 1970-01-01
  • 2021-11-11
  • 2019-08-20
  • 1970-01-01
  • 1970-01-01
  • 2021-10-20
  • 2020-07-28
  • 1970-01-01
  • 2021-11-17
相关资源
最近更新 更多