首页 文章

反应本机应用程序构建失败的反应本机firebase

提问于
浏览
2

我们有“react-native-firebase”:“4.2.0”,在安装了npm模块并尝试运行应用程序后我们就遇到了这个问题

FAILURE:构建因异常而失败 .

  • 出了什么问题:无法解析配置':app:debugCompileClasspath'的所有文件 .

找不到firebase-auth.aar(com.google.firebase:firebase-auth:15.1.0) . 在以下位置搜索:https://jcenter.bintray.com/com/google/firebase/firebase-auth/15.1.0/firebase-auth-15.1.0.aar找不到firebase-analytics-impl.aar( com.google.firebase:火力点 - 分析 - IMPL:15.0.2) . 在以下位置搜索:https://jcenter.bintray.com/com/google/firebase/firebase-analytics-impl/15.0.2/firebase-analytics-impl-15.0.2.aar无法找到firebase-common . aar(com.google.firebase:firebase-common:15.0.1) . 在以下位置搜索:https://jcenter.bintray.com/com/google/firebase/firebase-common/15.0.1/firebase-common-15.0.1.aar找不到firebase-common.aar(com . google.firebase:火力常见:15.0.1) . 在以下位置搜索:https://jcenter.bintray.com/com/google/firebase/firebase-common/15.0.1/firebase-common-15.0.1.aar

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

  • https://help.gradle.org获取更多帮助

2 回答

  • 0

    你有没有尝试过

    react-native link react-native-firebase?

  • 0

    我不知道这是不是问题,但是没有针对react-native的特定google firebase配置,因此您需要在https://console.firebase.google.com/内登录您的项目,访问您的项目并进入Web配置并在您的代码中实现 .

    例如:

    componentWillMount() {
            firebase.initializeApp({
                apiKey: "YOURAPIKEY",
                authDomain: "",
                databaseURL: "",
                projectId: "",
                storageBucket: "",
                messagingSenderId: "YOURKEY"
            });
    

    干杯,

相关问题