facebook - flutter_facebook_login CocoaPods 依赖错误
问题描述
我正在尝试将 facebook 登录添加到 Flutter 应用程序。我正在使用flutter_facebook_login
。但是当我尝试为 iOS 构建时给出错误:
Resolving dependencies of `Podfile`
[!] CocoaPods could not find compatible versions for pod "FBSDKLoginKit":
In Podfile:
flutter_facebook_login (from `.symlinks/plugins/flutter_facebook_login/ios`) was resolved to 0.0.1, which depends on
FBSDKLoginKit (= 4.39.1)
None of your spec sources contain a spec satisfying the dependency: `FBSDKLoginKit (= 4.39.1)`.
You have either:
* out-of-date source repos which you can update with `pod repo update` or with `pod install --repo-update`.
* mistyped the name or version.
* not added the source repo that hosts the Podspec to your Podfile.
Error: CocoaPods's specs repository is too out-of-date to satisfy dependencies.
To update the CocoaPods specs, run:
pod repo update
Error running pod install
Error launching application on iPhone X.
我没有手动安装 pod,因为flutter_facebook_login
自述文件说:
(注意:您可以跳过“第 2 步:设置您的开发环境”)。
有人帮忙吗?谢谢!
解决方案
根据这个diegoveloper的回答flutter_facebook_login github问题。
https://github.com/roughike/flutter_facebook_login/issues/201
flutter clean
- 删除
ios/Podfile.lock
文件 - 转到
Podfile
文件并从更改platform :ios, '9.0'
为platform :ios, '11.0'
(在我的情况下,一些库不支持 11.0,我使用平台:ios,'9.0 然后将 runner.xcsworkspace 中的部署目标设置为 9.0 并且它可以工作。) - 转到终端,
ios
目录并运行pod install
- 再次运行项目。
推荐阅读
- c++ - 异步写入位数组
- python - 我有两个相同的 CSV 文件,但由于 UnicodeDecodeError 无法将一个文件读入 Pandas DataFrame
- firebase - Firebase Cloud Firestore 设计
- arangodb - [未知标志]Arangodb 启动标志
- python - 错误 libtorch_python.so:无法打开共享对象文件:没有这样的文件或目录
- azure - 尽管启用了 HTTPS,但解析仪表板 HTTPS 错误
- xamarin - Xamarin - 如何在我的应用程序中显示通知?(ContentPage.ToolbarItems)
- javascript - 未捕获的类型错误:无法读取未定义的属性“retrieveMultiple”
- list - 根据 Netlogo 中可变数量的组合过滤列表列表
- node.js - 使用来自 2 个不同 nodeJS 微服务的 mongoose 连接到 Mongo 在 populate() 时会导致错误