我是React-Native的新手,正在开发一个项目。以前,它运行良好,但是当我安装与推送通知(用于消息传递的rnfirebase)相关的依赖项时,出现了这些错误,并且我也尝试了其他问题的所有可能解决方案,但没有成功。
这是我在安装Pod时遇到的全部错误。
[!] CocoaPods could not find compatible versions for pod "Firebase/Analytics":
In snapshot (Podfile.lock):
Firebase/Analytics (= 6.13.0)
In Podfile:
Firebase/Analytics
RNFBMessaging (from `../node_modules/@react-native-firebase/messaging`) was resolved to 7.1.5, which depends on
Firebase/Analytics (~> 6.25.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/Analytics` inside your development pod `RNFBMessaging`.
You should run `pod update Firebase/Analytics` to apply changes you've made.
这是pod文件中的代码。
# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
# pod 'Firebase/Auth'
pod 'Fabric', '~> 1.10.2'
pod 'Crashlytics', '~> 3.14.0'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods
我尝试了以下解决方法来解决此问题。
1. pod install --repo-update
2. pod repo remove master
pod setup
pod install
3. Delete podfile.lock
pod install
但是没有一种解决方案对我有用。谁能帮我解决这个问题?我将非常感谢。