mus*_*aki 9 ios dart firebase flutter google-cloud-firestore
cloud_firestore: ^0.16.0
firebase_auth: ^0.20.0+1
smooth_star_rating: ^1.0.4
google_maps: ^4.0.0
firebase_core: ^0.7.0
rxdart: ^0.24.1
Run Code Online (Sandbox Code Playgroud)
Pod 安装 分析依赖关系 cloud_firestore:使用“firebase_core”中定义的 Firebase SDK 版本“7.3.0” firebase_auth:使用“firebase_core”中定义的 Firebase SDK 版本“7.3.0” firebase_core:使用“firebase_core”中定义的 Firebase SDK 版本“7.3.0” firebase_core' [!] CocoaPods 找不到 pod“cloud_firestore”的兼容版本:在 Podfile 中:cloud_firestore(来自
.symlinks/plugins/cloud_firestore/ios)找到了满足
cloud_firestore (from.symlinks/plugins/cloud_firestore/ios)依赖项的规范,但它们需要更高的最低部署目标。[!]由于未指定平台
iOS,因此自动分配具有9.0目标版本的Runner平台。请在您的 Podfile 中为此目标指定平台。见https://guides.cocoapods.org/syntax/podfile.html#platform。
每当我尝试安装 pod 时,我都会在终端上收到此错误。
小智 18
正如错误所说,我们与 firebase 包不兼容,所以:我去了 Podfile 并升级到 10(平台:ios,'10.0'),错误消失了;
作为附加说明:我之前对该行进行了注释,所以我的第一次尝试是取消注释并升级到 9,但它不起作用。
升级到 10(平台:ios,'10.0')它的工作但面临另一个问题
cloud_firestore:^0.16.0
错误:CocoaPods 的规范存储库已经过时,无法满足依赖项。
可以通过在终端中执行以下命令来解决。
转到项目中的 /ios 文件夹。
删除 Podfile.lock
运行 pod install --repo-update (确保您的 cd 进入 flutter 应用程序的 iOS 目录)
运行 flutter clean
完成后,重建您的 Flutter 应用程序:flutter run
小智 8
此问题主要发生在使用带有 M1 芯片的 MacBook 时。
CocoaPods could not find compatible versions for pod "Firebase/Messaging":
Run Code Online (Sandbox Code Playgroud)
在 Podfile 中:firebase_messaging (from .symlinks/plugins/firebase_messaging/ios) 被解析为 10.0.0,这取决于 Firebase/Messaging (= 8.0.0)
这里的解决方案是尝试以下步骤:
#更新仓库
arch -x86_64 pod install --repo-update有效,我之前刚刚尝试过,但后来我意识到你必须删除位于 ios 文件夹 app/ios 中的Podfile.lock文件。
我还将平台更新为“platform :ios, '12.0'”&这就是它正在做的事情。
这个答案有效:https ://stackoverflow.com/a/67636592/12592516 。
然后你只需删除Podfile.lock
这是在 M1 芯片上。
我为此挣扎了很多,但现在我明白了,我希望这会有所帮助!
| 归档时间: |
|
| 查看次数: |
6481 次 |
| 最近记录: |