首页 > 解决方案 > 您试图通过调用 firebase.config() 来使用未安装在您的 Android 项目上的 firebase 模块

问题描述

向应用程序添加通知后,我在 android 中收到以下错误。错误:您试图通过调用 firebase.config() 来使用未安装在您的 Android 项目上的 firebase 模块。

确保您拥有:

1) 在“android/app/build.gradle”文件中安装了所需的 Firebase Android SDK 依赖项“com.google.firebase:firebase-config”。

2) 在“MainApplication.java”文件中导入“io.invertase.firebase.config.RNFirebaseRemoteConfigPackage”模块。

3) 在 RN 'getPackages()' 方法列表中添加了 'new RNFirebaseRemoteConfigPackage()' 行。

当我做所有推荐的事情(com.google.firebase:firebase-notifications:16.0.0)时,我发现运行时未找到 firebase-notifications:16.0.0 错误

标签: firebasereact-nativefirebase-remote-config

解决方案


推荐阅读