简体   繁体   English

Firebase/CoreOnly 的@react-native-firebase pod 版本冲突

[英]@react-native-firebase pod version conflict for Firebase/CoreOnly

I have a react-native project with these dependencies (all are the latest available):我有一个带有这些依赖项的 react-native 项目(都是最新的):

    "@react-native-firebase/analytics": "^14.5.1",
    "@react-native-firebase/app": "^14.5.1",
    "@react-native-firebase/config": "^0.1.5",
    "@react-native-firebase/perf": "^14.5.1",

But when I go to pod install , I get:但是当我 go 到pod install时,我得到:

[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
  In Podfile:
    RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 14.5.1, which depends on
      Firebase/CoreOnly (= 8.12.1)

    RNFBConfig (from `../node_modules/@react-native-firebase/config`) was resolved to 0.1.5, which depends on
      Firebase/RemoteConfig (~> 6.5.0) was resolved to 6.5.0, which depends on
        Firebase/CoreOnly (= 6.5.0)

I do not understand why config has a different version to all the others and how the latest versions of a project are conflicting.我不明白为什么 config 的版本与所有其他版本不同,以及项目的最新版本如何冲突。

I have tried the following to fix this: rm -rf ios/Pods ios/Podfile.lock pod repo remove trunk pod install pod update pod install --repo-update我尝试了以下方法来解决这个问题: rm -rf ios/Pods ios/Podfile.lock pod repo remove trunk pod install pod update pod install --repo-update

My ios/Podfile does not contain explicit pods for Firebase.我的 ios/Podfile 不包含 Firebase 的显式 pod。

Usually these commands tend to fix problems like this.通常这些命令倾向于解决这样的问题。 But not this time.但这次不是。 Thanks for any suggestions.感谢您的任何建议。

react-native-firebase maintainer here! react-native-firebase 维护者在这里!

The 'config' package was wrapping the firebase "Remote Config" SDK packages, so that name was not used in the final release of react-native-firebase - we used "remote-config" in the end, but the alpha releases with the wrong name were still up on npmjs.com. “配置”包包装了 firebase“远程配置”SDK 包,因此在 react-native-firebase 的最终版本中没有使用这个名称——我们最后使用了“remote-config”,但 alpha 版本与npmjs.com 上仍然显示错误的名称。

I just deprecated all versions of that package on npmjs.com so users should get a warning if they try to install it - no one should use that package.我只是在 npmjs.com 上弃用了该软件包的所有版本,因此如果用户尝试安装它,他们应该会收到警告——没有人应该使用该软件包。 If you use the 'remote-config' one, you'll be all set I think如果你使用'remote-config',我想你已经准备好了

The problem is that @react-native-firebase/config appears unrelated to the @react-native-firebase project, hence the different latest version and pod conflicts.问题是@react-native-firebase/config似乎与@react-native-firebase项目无关,因此不同的最新版本和 pod 冲突。 I had to use @react-native-firebase/remote-config instead, as found in the documentation https://github.com/invertase/react-native-firebase正如文档https://github.com/invertase/react-native-firebase中所见,我不得不改用@react-native-firebase/remote-config

The problem is that react native update a new architecture问题是 react native 更新了一个新的架构

  • Open the file Podfile and add use_frameworks: :linkage => :static inside your targets打开文件Podfile并在目标中添加use_frameworks: :linkage => :static
  • Disable the :flipper_configuration line禁用:flipper_configuration
  • Put $RNFirebaseAsStaticFramework = true at the top of podfile$RNFirebaseAsStaticFramework = true放在 podfile 的顶部

Then run然后运行

pod install --repo-update

For Mac M1对于 Mac M1

arch -x86_64 pod install --repo-update

Hope this useful to someone希望这对某人有用

I solved the issue by deleting the ./ios/Podfile.lock and run again pod install --repo-update command.我通过删除./ios/Podfile.lock并再次运行pod install --repo-update命令解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 CocoaPods 找不到 pod“Firebase/CoreOnly”的兼容版本 - CocoaPods could not find compatible versions for pod "Firebase/CoreOnly" react-native-firebase 在收到通知时播放自定义声音 - react-native-firebase play custom sound on notification arrived 安装 react-native-firebase/app 后,Build 将在 react-native ios 中失败 - After installing react-native-firebase/app it's Build will failed in react-native ios 无法从 React-Native-Firebase(v6) Firestore 获取数据:undefined 不是函数(靠近“...this._firestore.native.collectionGet...”) - Can't get data from React-Native-Firebase(v6) Firestore: undefined is not a function (near '...this._firestore.native.collectionGet...') 如何使用 react-native-firebase/messaging(FCM) 从栏点击通知后将应用程序打开到特定页面? - How to open app to specific page after click notification from bar by using react-native-firebase/messaging(FCM)? Firebase 是 react-native 后端 - Firebase are react-native backend Firebase pod 更新不更新 - Firebase pod update not updating 删除 firebase 中的 auth 用户 react native - Delete auth user in firebase react native react-native-firebase_messaging:compileReleaseJavaWithJavac - react-native-firebase_messaging:compileReleaseJavaWithJavac 使用 firebase 和 react native 出现异常错误 - Getting an unusual error using firebase with react native
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM