命令失败:在Reaction-Native中安装导航、FireBase、图标等依赖项时出现gradlew.bat installDebug错误 [英] Command Failed: gradlew.bat installDebug error whenever installing dependencies like navigation, firebase, icons etc in React-Native

查看:59
本文介绍了命令失败:在Reaction-Native中安装导航、FireBase、图标等依赖项时出现gradlew.bat installDebug错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在React本机项目中安装任何依赖项时,以及当我使用link命令(例如,REACT-Native link REACT-NATIVE-GRIGURE-HANDLER)时,这会导致在图像[1]中显示错误。 它不会生成显示错误gradlew.bat的项目

以下代码显示了我的Package.json文件

{
  "name": "navigations",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "start": "node node_modules/react-native/local-cli/cli.js start",
    "test": "jest"
  },
  "dependencies": {
    "react": "16.6.3",
    "react-native": "0.58.3",
    "react-native-gesture-handler": "^1.0.15",
    "react-navigation": "^3.0.9"
  },
  "devDependencies": {
    "babel-core": "7.0.0-bridge.0",
    "babel-jest": "24.0.0",
    "jest": "24.0.0",
    "metro-react-native-babel-preset": "0.51.1",
    "react-test-renderer": "16.6.3"
  },
  "jest": {
    "preset": "react-native"
  }
}

推荐答案

如果您有Windows计算机,请执行以下步骤:

Optional (
  Delete iOS, Android folders

  Run `react-native eject` ( that command will rebuild deleted folders for you )
)

然后:

1)cd ./android

2)./gradlew.bat installDebug(乞讨时带点)

一旦成功完成

3)cd ../(返回根文件夹)

4)react-native run-android

祈祷它能像预期的那样工作:)[对我来说是这样的]

这篇关于命令失败:在Reaction-Native中安装导航、FireBase、图标等依赖项时出现gradlew.bat installDebug错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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