【问题标题】:Error Installing Firebase In App Messaging in React Native在 React Native 的应用程序消息中安装 Firebase 时出错
【发布时间】:2020-06-30 19:04:36
【问题描述】:

我正在尝试在我的应用中安装 Firebase 应用内消息组件 我之前已经安装了我现有的 firebase 组件,下面是我的 package.json 在安装应用内消息传递之前对于 firebase 的样子。

    "@react-native-firebase/analytics": "^6.7.1",
    "@react-native-firebase/app": "^6.7.1",
    "@react-native-firebase/crashlytics": "^6.7.1",
    "@react-native-firebase/dynamic-links": "^6.7.1",
    "@react-native-firebase/messaging": "^6.7.1",

所以我决定

npm install --save @react-native-firebase/in-app-messaging@^6.7.1

当我尝试pod install 时,我收到以下错误:

CocoaPods could not find compatible versions for pod "GoogleDataTransportCCTSupport":
  In snapshot (Podfile.lock):
    GoogleDataTransportCCTSupport (= 3.0.0, ~> 3.0)

  In Podfile:
    RNFBInAppMessaging (from `../node_modules/@react-native-firebase/in-app-messaging`) was resolved to 6.7.1, which depends on
      Firebase/InAppMessaging (~> 6.13.0) was resolved to 6.13.0, which depends on
        FirebaseInAppMessaging (~> 0.15.5) was resolved to 0.15.6, which depends on
          GoogleDataTransportCCTSupport (~> 1.0)

    RNFBMessaging (from `../node_modules/@react-native-firebase/messaging`) was resolved to 6.7.1, which depends on
      Firebase/Messaging (~> 6.13.0) was resolved to 6.13.0, which depends on
        FirebaseMessaging (~> 4.1.9) was resolved to 4.1.10, which depends on
          FirebaseCore (~> 6.2) was resolved to 6.4.0, which depends on
            FirebaseCoreDiagnostics (~> 1.0) was resolved to 1.2.4, which depends on
              GoogleDataTransportCCTSupport (~> 3.0)

我错过了什么吗?

【问题讨论】:

    标签: firebase react-native firebase-cloud-messaging firebase-in-app-messaging


    【解决方案1】:

    CocoaPods could not find compatible versions for pod “GoogleDataTransportCCTSupport” 的副本

    发生这种情况是因为您显然使用的是已弃用的 firebase 5.x.x。简而言之,您需要采取上述问题中推荐的解决方法。

    或者您可以升级到 firebase 6.x.x

    【讨论】:

    • 嘿,我使用的是 Firebase 6,我迁移了一个月
    • 好的@Epiczzor 我只是注意到了这一点,我没有看到任何其他原因导致此错误。尝试使用 rm -rf Podfile.lock 删除 Podfile.lock,然后再次执行 pod install
    【解决方案2】:
    1. 更新 cocopod (https://guides.cocoapods.org/using/getting-started.html)
    2. 删除 pod 锁定文件
    3. pod install

    【讨论】:

      【解决方案3】:

      看起来您的 podfile 中可能存在冲突。删除您的 podfile 并运行 pod install --repo-update 可能会有所帮助。还要确保您没有任何旧版本遗留下来的 firebase pod(请参阅here)。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2021-01-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-11-02
        相关资源
        最近更新 更多