React-native 和 react-native-navigation 错误 [英] React-native and react-native-navigation error

查看:91
本文介绍了React-native 和 react-native-navigation 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 react-native-navigation 有疑问,当我尝试使用命令 npm run android 启动我的应用程序时,我收到一个错误,这里是代码为https://github.com/albert002/learn-react-native' `* 出了什么问题:无法确定任务:app:compileDebugJavaWithJavac"的依赖关系.

I have question about react-native-navigation , when i am trying to start my app with command npm run android i am getting an error here is the github repo with code 'https://github.com/albert002/learn-react-native' `* What went wrong: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.

无法解析配置:app:debugCompileClasspath"的所有任务依赖项.无法解析项目:react-native-navigation.要求:项目:应用程序无法找到项目的匹配配置 :react-native-navigation: 可使用的配置都没有属性.

Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'. Could not resolve project :react-native-navigation. Required by: project :app Unable to find a matching configuration of project :react-native-navigation: None of the consumable configurations have attributes.

  • 试试:使用 --stacktrace 选项运行以获取堆栈跟踪.使用 --info 或 --debug 选项运行以获得更多日志输出.使用 --scan 运行以获得完整的见解.
  • 推荐答案

    首先,您应该通过运行以下命令来安装所有依赖项

    first, you should install all dependency by running the following command

    npm 安装

    然后

    npm 启动

    运行 react native android 项目运行

    to run react native android project run

    react-native run-android

    react-native run-android

    这对我有用.

    这篇关于React-native 和 react-native-navigation 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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