首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >CocoaPods无法为pod "FBSDKLoginKit“找到兼容的版本。

CocoaPods无法为pod "FBSDKLoginKit“找到兼容的版本。
EN

Stack Overflow用户
提问于 2021-07-09 21:43:11
回答 2查看 2.2K关注 0票数 2

我正在使用flutter_login_facebook 1.0.1插件来使用Facebook登录到我的应用程序。

当我试图在iOS设备上设置Facebook登录时,我得到了下面的错误。

代码语言:javascript
运行
复制
 pod install
    WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
    Consider adding the following to ~/.profile:

    export LANG=en_US.UTF-8
    
Analyzing dependencies
Pre-downloading: `FirebaseFirestore` from `https://github.com/invertase/firestore-ios-sdk-frameworks.git`, tag `8.0.0`
cloud_firestore: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '8.0.0' defined in 'firebase_core'
[!] CocoaPods could not find compatible versions for pod "FBSDKLoginKit":
  In Podfile:
    flutter_facebook_auth (from `.symlinks/plugins/flutter_facebook_auth/ios`) was resolved to 2.0.0, which depends on
      FBSDKLoginKit (~> 11.0.0)

    flutter_login_facebook (from `.symlinks/plugins/flutter_login_facebook/ios`) was resolved to 0.5.0, which depends on
      FBSDKLoginKit (~> 9.1)

我尝试了以下步骤,我可以从堆栈溢出的其他帖子中找到这些步骤,但没有取得任何进展:

使用以下命令( pod update FBSDKCoreKitpod update FBSDKLoginKitpod repo update.

  • Excuted pod install

)执行flutter clean command.

  • Tried flutter pub get更新

下面是我的Podfile的内容

代码语言:javascript
运行
复制
# Uncomment this line to define a global platform for your project
platform :ios, '11.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

def flutter_root
  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
  unless File.exist?(generated_xcode_build_settings_path)
    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
  end

  File.foreach(generated_xcode_build_settings_path) do |line|
    matches = line.match(/FLUTTER_ROOT\=(.*)/)
    return matches[1].strip if matches
  end
  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
  pod 'FirebaseFirestore', :git => 'https://github.com/invertase/firestore-ios-sdk-frameworks.git', :tag => '8.0.0'
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

请查找以下有关我的颤音和飞镖版本的详细信息:

代码语言:javascript
运行
复制
Flutter 2.2.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision d79295af24 (4 weeks ago) • 2021-06-11 08:56:01 -0700
Engine • revision 91c9fc8fe0
Tools • Dart 2.13.3

有人能帮我解决这个问题吗。谢谢你提前帮忙。

EN

Stack Overflow用户

发布于 2022-07-01 10:12:30

删除Podfile.lock并运行pod安装--回购更新--为我解决了这个错误。

票数 0
EN
查看全部 2 条回答
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/68322974

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档