Flutter致命错误:找不到模块'FBSDKCoreKit'

dgjrabp2  于 2022-11-25  发布在  Flutter
关注(0)|答案(5)|浏览(372)

我使用的是flutter_facebook_login 3.0.0
当我尝试运行我的应用程序时出现此错误

构建失败Xcode的输出:在/用户/***//ios/Pod/FBSDK登录工具包/FBSDK登录工具包/内部/_FBSDK登录恢复尝试器.m:21包含的文件中:在/用户///ios/Pod/FBSDK登录工具包/FBSDK登录工具包/内部/FBSDK登录工具包+内部.h:19包含的文件中:在/用户///ios/Pod/FBSDK登录工具包/FBSDK登录工具包/内部/../FBSDK登录工具包.h:27中包含的文件中:/用户//***/ios/Pod/FBSDK登录工具包/FBSDK登录工具包/FBSDK登录工具包/FBSDK登录按钮。h:24:9:致命错误:模块'FBSDKCoreKit'未找到@导入FBSDKCoreKit;

for the simulator. Error launching application on iPhone 8.
pqwbnv8z

pqwbnv8z1#

我已通过更改播客文件解决了此问题

target 'Runner' do
# flutter Pod
use_frameworks!
use_modular_headers!
------

振动式清选机
删除播客文件.lock
pod安装--repo更新
面板更新FBSDKLoginKit
执行

flutter clean && cd ios && sudo rm Podfile.lock && pod install --repo-update && pod update FBSDKLoginKit

打开.xcworkspace并在General-〉Deployment Info中设置目标11.0,同时在Podfile中设置目标11.0

9lowa7mx

9lowa7mx2#

到目前为止,唯一对我有效的方法是this
您必须使用5.8.0版本的Facebook SDK覆盖Podfile.lock。

PODS:
  - FBSDKCoreKit (5.8.0):
    - FBSDKCoreKit/Basics (= 5.8.0)
    - FBSDKCoreKit/Core (= 5.8.0)
  - FBSDKCoreKit/Basics (5.8.0)
  - FBSDKCoreKit/Core (5.8.0):
    - FBSDKCoreKit/Basics
  - FBSDKLoginKit (5.8.0):
    - FBSDKLoginKit/Login (= 5.8.0)
  - FBSDKLoginKit/Login (5.8.0):
    - FBSDKCoreKit (~> 5.0)
  - Flutter (1.0.0)
....
nc1teljy

nc1teljy3#

I've been around the houses and back with this and have eventually got this to work with the 5.13.1 Podfiles on iOS (by work, I mean compiling, linking and installing onto a real iPhone - I don't actually use Facebook but it's required as part of the firebase-ui login package :-D )
Firstly, do a pod clean, e.g.

Run: flutter clean
Go to ios folder, delete Podfile, Podfile.lock, Pods folder, Runner.xcworkspace
Run project again

After building I got errors regarding:

fatal error: module 'FBSDKCoreKit' not found
    @import FBSDKCoreKit;

I then added the modular headers override into the ios/podspec file mentioned here https://github.com/roughike/flutter_facebook_login/issues/214#issuecomment-565166295
The start of the podfile looks like this:

platform :ios, '12.0'

use_modular_headers!

I did note that linking errors, about missing Facebook libraries, were due to a spurious entry in the Frameworks section.
Futher details in this thread

mrfwxfqh

mrfwxfqh4#

我已经解决了以下步骤,我曾面临这个问题,由于facebook_share插件,所以
1.降级facebook_share插件的版本到. 0.0.1+1
2.run 命令在项目的终端- pod缓存清理-all
3.在Podfile中添加以下两个pod:

target 'Runner' do
use_frameworks!
use_modular_headers!

pod 'FBSDKCoreKit', '~> 6.0.0'
pod 'FBSDKShareKit', '~> 6.0.0'

4.run 命令- Pod安装
5.run 命令更新FBSDKShareKit
完成,错误已删除

yv5phkfx

yv5phkfx5#

这个问题解决了我的问题'FBSDKCoreKit / FBSDKCoreKit.h' file not found

pod 'FBSDKCoreKit', '4.38'
  pod 'FBSDKLoginKit', '4.38'
  pod 'FBSDKShareKit', '4.38'

相关问题