更新我的 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 没有显示任何错误。
在类似问题上对我有用的答案位于https://stackoverflow.com/a/70029467/3120387
此错误的通常调用通常归结为尝试调用
pod repo update
。
如果这不起作用,请删除根目录中的Podfile.lock,然后运行
pod install
。
对于 M1 Mac 用户,请尝试以下操作:
转到项目中的ios/Pods/LocalPodspecs目录
检查每个 json 文件以查找所需的最高 iOS 版本。其中一些是我的
"ios": "10.0"
返回ios/目录
打开Podfile文件
取消注释
并将# platform :ios, '9.0'
替换为步骤 2 中的版本。 - 例如9.0
。10.0
运行
sudo arch -x86_64 gem install ffi
运行
arch -x86_64 pod repo update
运行
应该消失了arch -x86_64 pod install error
如果使用 Flutter
返回根目录 - 打开 iOS 模拟器并运行cd -
flutter run
查看来自 SO 的这个答案以获取更多解决方案。