【问题标题】:react native app build failing for react-native firebasereact-native firebase 的本机应用程序构建失败
【发布时间】:2018-11-06 21:45:52
【问题描述】:

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

FAILURE:构建失败并出现异常。

【问题讨论】:

标签: android firebase react-native build


【解决方案1】:

你试过了吗

react-native 链接 react-native-firebase ?

【讨论】:

  • 从项目中删除android和ios文件夹并运行react-native eject & react-native link react-native-firebase,看看是否有帮助
  • 请将 questions 发布为 cmets 而不是 answers
  • @Cherniv 我知道,但我没有足够的积分,所以我不能直接评论。谢谢
【解决方案2】:

我不知道是不是这个问题,但是react-native没有具体的google firebase配置,所以你需要在https://console.firebase.google.com/里面登录你的项目,访问你的项目并进入web配置并实现在你的代码中。

例如:

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

干杯,

【讨论】:

    猜你喜欢
    • 2019-10-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-01-07
    • 1970-01-01
    • 1970-01-01
    • 2019-01-16
    相关资源
    最近更新 更多