缺少React Native中的依赖项

时间:2018-01-18 01:14:27

标签: android react-native

我正在尝试为Android构建应用,但整个下午都遇到了这个错误:

A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > Configuration with name 'default' not found.

我想,只需要运行一些更新。所以从应用程序的根目录我尝试过:

yarn

然后

npm i

cup all -y

但问题仍然存在。

settings.gradle:

rootProject.name = 'MyAppName'

include ':react-native-firestack'
project(':react-native-firestack').projectDir = new File(rootProject.projectDir, './node_modules/:react-native-firestack/android/')

include ':react-native-fbsdk'
project(':react-native-fbsdk').projectDir = new File(rootProject.projectDir, './node_modules/:react-native-fbsdk/android/')

include ':app'

1 个答案:

答案 0 :(得分:0)

安装react-native run-android后是否运行此命令(react-native-fbsdk)。