facebook - flutter_facebook_login CocoaPods依赖错误

标签 facebook dart flutter facebook-login flutter-plugin

我尝试将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自述文件说:

(Note: you can skip "Step 2: Set up Your Development Environment").



有人帮忙吗?
谢谢!

最佳答案

根据这个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
  • 再次运行项目。
  • 关于facebook - flutter_facebook_login CocoaPods依赖错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55596988/

    相关文章:

    ruby-on-rails - 带有 'omniauth-facebook' gem 的无效 redirect_uri

    firebase - 在 Flutter 中处理 Firebase 权限不足的错误

    flutter - 为什么 Flutter App 在 Chrome 中打开而不是在模拟器上打开?

    Flutter 使用 Getx 关闭选定的对话框

    android - 在同一代码库中使用 Android 和 iOS 代码编写 React Native?

    android - Facebook 需要 28 个字符长的 sha1 哈希。 Keytool 生成 24 个字符而不是 28 个

    android - Facebook SSO 示例不工作 - "An error ocurred. Please try again later"

    android-studio - android studio中flutter和dart的插件问题

    dart - 如何在 flutter 中自动调整行内文本的大小

    android-studio - Flutter Doctor 扫描设备需要很长时间