首页 > 解决方案 > 安装 @react-native-firebase/admob cocoapods 后出现错误

问题描述

我安装了@react-native-firebase/admob

然后我使用了 pod install。cocoapods 出错。我还使用了 pod install --repo-update 它对我不起作用。此 admob 在 android 上运行良好,但 iOS 显示此错误。如果你知道如何,如果你能告诉我,我将不胜感激。

[!] CocoaPods could not find compatible versions for pod "firebase/AdMob":
   In Podfile:
      RNFBAdMob (from `../node_modules/@react-native-firebase/admob`) was resolved to 11.5.0, which depends on Firebase/AdMob (= 8.4.0)

None of your spec source contain a spec satisfying the dependency: `Firebase/AdMob (= 8.4.0)`.

包.json

"@react-native-community/masked-view": "^0.1.11",
"@react-native-firebase/admob": "^11.5.0",
"@react-native-firebase/app": "^12.4.0",
"@react-native-firebase/functions": "^12.4.0",
"@react-native-firebase/messaging": "^12.4.0",
"@react-native-firebase/storage": "^12.3.0",
"@react-native-picker/picker": "^1.16.3",
"@react-navigation/bottom-tabs": "^5.11.11",
"@react-navigation/native": "^5.9.4",
"@react-navigation/stack": "^5.14.5",
"axios": "^0.21.1",
"firebase": "^8.7.0",
"moment": "^2.29.1",
"phone": "^3.1.6",
"querystring": "^0.2.1",
"react": "17.0.1",
"react-firebase-hooks": "^3.0.4",
"react-native": "0.64.2",
"react-native-admob": "^2.0.0-beta.6",
"react-native-device-info": "^8.3.0",
"react-native-gesture-handler": "^1.10.3",
"react-native-image-crop-picker": "^0.36.2",
"react-native-mail": "^6.1.0",
"react-native-modal": "^12.0.2",
"react-native-push-notification": "^7.4.0",
"react-native-reanimated": "^2.2.0",
"react-native-safe-area-context": "^3.2.0",
"react-native-screens": "^3.4.0",
"react-native-vector-icons": "^8.0.0",
"twilio": "^3.67.0"

标签: javascriptfirebasereact-nativefirebase-admob

解决方案


推荐阅读