![](/img/trans.png)
[英]CocoaPods could not find compatible versions for pod "Firebase/CoreOnly"
[英]React-native iOS : Cocoapods could not find compatible version for pod "Firebase/CoreOnly","Google-Maps-iOS-Utils" & "GoogleMaps"
為我的 react-native 項目運行pod install
時出現以下錯誤。 我嘗試運行pod install --repo-update
和pod repo update
,但它對我不起作用。
[:] CocoaPods 找不到 pod“Firebase/CoreOnly”的兼容版本:在 Podfile 中:RNFBApp(來自
../node_modules/@react-native-firebase/app
)已解析為 8.4.3,這取決於 Firebase/CoreOnly (~> 6.30.0)RNFBFirestore (from `../node_modules/@react-native-firebase/firestore`) was resolved to
依賴於 Firebase/Firestore (~> 6.30.0) 的 7.8.2 已解析為依賴於 Firebase/CoreOnly (= 6.30.0) 的 6.30.0
RNFBRemoteConfig (from `../node_modules/@react-native-firebase/remote-config`) was resolved
到 6.7.1,這取決於 Firebase/Core (~> 6.13.0) 已解析為 6.13.0,這取決於 Firebase/CoreOnly (= 6.13.0)
CocoaPods 找不到 pod“Google-Maps-iOS-Utils”的兼容版本:在 Podfile 中:Google-Maps-iOS-Utils
react-native-google-maps (from `../node_modules/react-native-maps`) was resolved to 0.27.1, which
取決於 Google-Maps-iOS-Utils (= 2.1.0)
CocoaPods 找不到 pod“GoogleMaps”的兼容版本:
在 Podfile 中:react-native-google-maps(來自../node_modules/react-native-maps
)被解析為 0.27.1,這取決於 Google-Maps-iOS-Utils (= 2.1.0) 被解析為 2.1 .0,這取決於 GoogleMapsreact-native-google-maps (from `../node_modules/react-native-maps`) was resolved to 0.27.1, which
取決於 GoogleMaps (= 3.5.0)
誰能給出一個可能的解決方案來解決這個問題?
如果您確定已正確安裝所有內容並且 pod repo update 仍然無法正常工作,請刪除 Podfile.lock 然后再次執行“pod install”。
我這樣解決了:
node_modules/react-native-maps/react-native-google-maps.podspec
並且我有以下版本:require 'json'
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
Pod::Spec.new do |s|
...
s.dependency 'GoogleMaps', '5.1.0'
s.dependency 'Google-Maps-iOS-Utils', '3.10.3'
...
Podfile
: rn_maps_path = '../node_modules/react-native-maps'
pod 'react-native-google-maps', :path => rn_maps_path
pod 'GoogleMaps', '5.1.0' # <<<<---- I added the '5.1.0' version here
pod 'Google-Maps-iOS-Utils', '3.10.3' # <<<<---- I added the '3.10.3' version here
pod install
並收到此錯誤: [!] The platform of the target
可能與which has a minimum requirement of iOS 11.0.
GoogleMaps (5.1.0) (iOS 10.0) may not be compatible with
。Podfile
的基礎上將最低要求的構建版本更新為11.0
:platform :ios, '10.0'
pod install
,一切正常。花了我一些時間。 但修好了。 確保 iOS 的版本至少為11
。 您可以在Podfile
的頂部更改它:
platform :ios, '11.0'
經過一些嘗試,我刪除了 podfile.lock 然后 pod install 並且它工作
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.