首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >RNFirebase核心模块未在Android上本地找到,请确保正确添加了RNFirebase和Firebase gradle依赖项

RNFirebase核心模块未在Android上本地找到,请确保正确添加了RNFirebase和Firebase gradle依赖项
EN

Stack Overflow用户
提问于 2019-05-27 23:05:23
回答 1查看 3.3K关注 0票数 2

我有一个奇怪的错误一个小时,我无法修复它。我有我所需要的所有依赖项。

错误

代码语言:javascript
复制
dependencies {
    implementation project(':react-native-firebase')
    implementation project(':react-native-code-push')
    implementation project(':react-native-sentry')
    implementation project(':react-native-vector-icons')
    implementation project(':react-native-iap')
    implementation project(':react-native-amplitude-analytics')
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
    implementation "com.facebook.react:react-native:+"  // From node_modules
    implementation "com.google.android.gms:play-services-base:16.0.1"
    implementation "com.google.firebase:firebase-core:16.0.6"
    implementation "com.google.firebase:firebase-ads:15.0.1"
    implementation "com.google.firebase:firebase-config:16.1.2"
    implementation "com.google.firebase:firebase-messaging:17.3.4"

    implementation "com.google.firebase:firebase-auth:9.6.1"
    implementation "com.google.firebase:firebase-database:9.6.1"

    implementation "com.google.firebase:firebase-messaging:17.3.0"
    implementation "com.google.firebase:firebase-core:16.0.3"
    implementation "com.google.firebase:firebase-auth:16.0.3"
    implementation "com.google.firebase:firebase-database:16.0.1"
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-05-28 00:46:48

确保在MainApplication.java中包含了这一行

代码语言:javascript
复制
import io.invertase.firebase.RNFirebasePackage;

代码语言:javascript
复制
 @Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
      new MainReactPackage(),
      new RNFirebasePackage(), <----- this
  );
}
票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56333276

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档