Flutter Firebase Pubspec.yaml Update-- Getting [!] CocoaPods could not find compatible versions for pod“Firebase/CoreOnly”:

jk9hmnmh  于 2023-03-24  发布在  Flutter
关注(0)|答案(1)|浏览(129)

更新我的pubspect yaml版本后

firebase_auth: ^1.0.1
firebase_core: ^1.0.2
cloud_firestore: ^1.0.3

firebase_auth: ^1.1.2
firebase_core: ^1.1.0
cloud_firestore: ^1.0.7

我得到了以下输出:

checking is only perfomed in repo update
    [!] CocoaPods could not find compatible versions for pod "Firebase/CoreOnly":
      In snapshot (Podfile.lock):
        Firebase/CoreOnly (= 7.3.0)

      In Podfile:
        firebase_core (from `.symlinks/plugins/firebase_core/ios`) was resolved to 1.1.0, which depends on
          Firebase/CoreOnly (= 7.11.0)

    You have either:
     * out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
     * changed the constraints of dependency `Firebase/CoreOnly` inside your development pod `firebase_core`.
       You should run `pod update Firebase/CoreOnly` to apply changes you've made.

在iOS文件夹中运行'pod init'后,我得到

[!] No Xcode project found, please specify one

并且在iOS文件夹中运行'pod install'之后,

[!] No `Podfile' found in the project directory.

不过,该Podfile确实存在。[请参阅所附图片][1]
而且,我的Flutter Doctor没有显示任何错误。
谢谢,一切顺利,-A. V. [1]:https://i.stack.imgur.com/DR2kx.png

mrfwxfqh

mrfwxfqh1#

在类似问题上对我有效的答案是https://stackoverflow.com/a/70029467/3120387
1.转到项目中的/ios文件夹。
1.删除Podfile.lock(YourPoject/ios/Podfile.lock)
1.删除Project.Workspace文件。
1.运行pod install --repo-update(确保你的cd进入flutter应用的iOS目录)
1.运行扑净
1.完成后,重建Flutter应用程序:Flutter试验

相关问题