React Native 添加crashlytics以响应本机项目引发的错误

xyhw6mcr  于 2022-11-17  发布在  React
关注(0)|答案(1)|浏览(84)

我在我的react原生项目上使用了多个firebase服务。现在我尝试添加crashlytics

yarn add @react-native-firebase/crashlytics

但我收到错误

[!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
  In snapshot (Podfile.lock):
    Firebase/CoreOnly (= 8.12.1)

  In Podfile:
    RNFBApp (from `../node_modules/@react-native-firebase/app`) was resolved to 16.4.3, which depends on
      Firebase/CoreOnly (= 10.1.0)

You have either:
 * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
 * changed the constraints of dependency `Firebase/CoreOnly` inside your development pod `RNFBApp`.
   You should run `pod update Firebase/CoreOnly` to apply changes you've made.

这是我的package.json的外观

"@react-native-firebase/app": "^16.4.3",
    "@react-native-firebase/auth": "^14.5.0",
    "@react-native-firebase/crashlytics": "^16.4.3",
    "@react-native-firebase/database": "^14.9.3",
    "@react-native-firebase/dynamic-links": "^16.4.3",
    "@react-native-firebase/firestore": "^14.5.1",
    "@react-native-firebase/messaging": "^16.4.3",
    "@react-native-firebase/storage": "^14.9.0",

我发现了很多关于同一个问题的讨论,但是没有任何帮助。我在pod文件中将platform:ios,'12.1'更改为platform:ios,'13.0'。Pod更新和pod安装命令也没有帮助。

htzpubme

htzpubme1#

请检查以下方法是否有效
1.删除ios/Podfile.lock
1.运行pod install --repo-update命令。

相关问题