首页 > 解决方案 > CocoaPods 找不到 pod "FirebaseFirestore" 的兼容版本:

问题描述

我有一个似乎无法解决的问题。我已经尝试了之前列出的所有解决方案,但没有解决错误。我正在使用 Flutterflow.io 构建一个应用程序,这是一个低代码平台。到目前为止,使用 Andriod Studio 的本地 iOS 构建一切都很好(Andriod 构建仍在工作),但现在 CocoasPods 和 Firebase 没有连接。任何帮助将不胜感激!

[!] CocoaPods could not find compatible versions for pod "FirebaseFirestore":

在 Podfile 中:FirebaseFirestore(来自https://github.com/invertase/firestore-ios-sdk-frameworks.git, tag 8.6.0

cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) was resolved to 2.5.0, which depends on
  Firebase/Firestore (= 8.5.0) was resolved to 8.5.0, which depends on
    FirebaseFirestore (~> 8.5.0)

我也从运行模式收到此消息。

“您有: * 过时的源代码库,您可以使用pod repo update或更新pod install --repo-update。* 更改了Firebase/Auth开发 pod 内的依赖约束firebase_auth。您应该运行pod update Firebase/Auth以应用您所做的更改。”

我尝试更新 pod、repo、runpod update Firebase/Auth并删除 podfile.lock 文件夹,但无济于事。一切似乎都指向同一个问题,即 Pod 和 Firestore 无法通信。我对我缺乏专业知识表示歉意,因为我对任何类型的计算机编程都不熟悉。

标签: firebasefluttergoogle-cloud-firestorecocoapods

解决方案


为我工作了这个修复:

  1. 转到/ios项目中的文件夹。

  2. 如果没有,请删除Podfile.lock( )。YourProject/ios/Podfile.lock

  3. 打开您的Podfile, 也在您的ios/文件夹中。

  4. 找到这个位:

target 'Runner' do
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.6.0'
  1. 更改tag => '8.6.0'tag => '8.5.0'
  2. 再跑pod install。确保您在ios/文件夹内。( cd ios)

然后flutter run在 ios 文件夹之外再试一次,应该会运行。

希望这有助于解决 Firestore 问题。


推荐阅读