flutter_facebook_login CocoaPods依赖错误 [英] flutter_facebook_login CocoaPods dependency error
本文介绍了flutter_facebook_login CocoaPods依赖错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试将Facebook登录名添加到Flutter应用中.我正在使用 flutter_facebook_login
.但是,当我尝试为iOS构建时,出现错误:
I am try add facebook login to Flutter app. I am use flutter_facebook_login
. But when I try build for iOS give error:
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
自述说:
I no install pod manually because flutter_facebook_login
readme say:
(注意:您可以跳过第2步:设置开发环境").
(Note: you can skip "Step 2: Set up Your Development Environment").
有人帮忙吗?谢谢!
推荐答案
根据这个 diegoveloper的答案 flutter_facebook_login github问题.
According to this diegoveloper's answer flutter_facebook_login github issue.
https://github.com/roughike/flutter_facebook_login/issues/201
-
干净整洁
- 删除
ios/Podfile.lock
文件 - 转到
Podfile
文件,并将其从platform:ios,'9.0'
更改为platform:ios,'11 .0'
(就我而言,某些库不支持11.0,我使用平台:ios,'9.0然后将Runner.xcsworkspace中的部署目标设置为9.0即可.) - 转到终端
ios
目录并运行pod install
- 再次运行项目.
flutter clean
- Remove
ios/Podfile.lock
file - Go to the
Podfile
file and changed fromplatform :ios, '9.0'
toplatform :ios, '11.0'
(In my case, some libs don't support 11.0 and I use platform :ios, '9.0 then set deployment target in runner.xcsworkspace to 9.0 and it work.) - Go to the terminal ,
ios
directory and runpod install
- Run the project again.
这篇关于flutter_facebook_login CocoaPods依赖错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文