小编Mon*_*wfi的帖子

Flutter Pod 在 iOS 上安装 Firebase 消息传递时出现错误

在 ios flutter 应用程序文件夹上运行时无法执行命令“pod install”。

错误如下:

分析依赖项 firebase_core:使用“firebase_core”中定义的 Firebase SDK 版本“10.0.6” firebase_messaging:使用“firebase_core”中定义的 Firebase SDK 版本“10.0.6”

[!] CocoaPods 找不到 pod“Firebase/Messaging”的兼容版本:在 Podfile 中:firebase_messaging(来自.symlinks/plugins/firebase_messaging/ios)已解析为 10.0.6,这取决于 Firebase/Messaging (= 10.0.6)

您的规范源都不包含满足依赖项的规范:Firebase/Messaging (= 10.0.6)。

您有:

  • 过时的源存储库,您可以使用pod repo update或 来更新pod install --repo-update。
  • 名称或版本输入错误。
  • 未将托管 Podspec 的源存储库添加到您的 Podfile。

我们在 pubspec.yaml 上有这个包

firebase_core: ^1.6.0
firebase_messaging: ^10.0.6
Run Code Online (Sandbox Code Playgroud)

在 Podfile 上:

platform :ios, '10.0'
Run Code Online (Sandbox Code Playgroud)

我们使用 pod 版本:

1.11.0.rc.1
Run Code Online (Sandbox Code Playgroud)

macOS Big Sur 版本:

11.2.1
Run Code Online (Sandbox Code Playgroud)

如果我们从 pubspec.yaml 中删除这个包,pod install 就可以正常工作。

我们尝试了很多方法都没有效果!

  • pod install --repo-update 这没有帮助; …

ios cocoapods flutter

4
推荐指数
1
解决办法
5563
查看次数

标签 统计

cocoapods ×1

flutter ×1

ios ×1