【问题标题】:flutter fatal error: module 'FBSDKCoreKit' not found颤振致命错误:找不到模块'FBSDKCoreKit'
【发布时间】:2020-04-22 13:49:31
【问题描述】:

我正在使用flutter_facebook_login 3.0.0

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

** BUILD FAILED ** Xcode 的输出:↳ 在 /Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/_FBSDKLoginRecoveryAttempter.m:21 中包含的文件中: 在包含的文件中 /Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/FBSDKLoginKit+Internal.h:19: 在包含的文件中 /Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/Internal/../FBSDKLoginKit.h:27: /Users/*****/*****/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginButton.h:24:9: 致命错误:找不到模块“FBSDKCoreKit”@import FBSDKCoreKit;

for the simulator. Error launching application on iPhone 8.

【问题讨论】:

    标签: ios flutter


    【解决方案1】:

    我已经按照以下步骤解决了这个问题,由于 facebook_share 插件,我遇到了这个问题

    1.downgrade facebook_share 插件的版本。 0.0.1+1
    2.在项目的终端运行命令 - pod cache clean --all
    3.在Podfile下面添加两个pod:

    target 'Runner' do
    use_frameworks!
    use_modular_headers!
    
    pod 'FBSDKCoreKit', '~> 6.0.0'
    pod 'FBSDKShareKit', '~> 6.0.0'
    

    4.在项目终端中运行命令 - Pod install
    5.在你的项目终端运行命令 - pod update FBSDKShareKit

    完成,错误已删除

    【讨论】:

      【解决方案2】:

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

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

      【讨论】:

        【解决方案3】:

        我已经通过更改 Podfile 设法解决了这个问题

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

        颤抖干净

        删除 Podfile.lock

        pod install --repo-update

        pod 更新 FBSDKLoginKit

        打开 .xcworkspace 并在 General-> Deployment Info 中设置 Target 11.0 也在 Podfile 中设置 Target 11.0

        【讨论】:

          【解决方案4】:

          我一直在四处走动,并最终得到了这个与 iOS 上的 5.13.1 Podfiles 一起使用的功能(我的意思是编译、链接和安装到真正的 iPhone 上 - 我实际上并没有使用 Facebook,但它是 firebase-ui 登录包的一部分:-D)

          首先,做一个 pod clean,例如

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

          构建后我收到以下错误:

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

          然后我将模块化标头覆盖添加到此处提到的 ios/podspec 文件中 https://github.com/roughike/flutter_facebook_login/issues/214#issuecomment-565166295

          podfile 的开头如下所示:

          platform :ios, '12.0'
          
          use_modular_headers!
          

          我确实注意到有关缺少 Facebook 库的链接错误是由于“框架”部分中的虚假条目造成的。

          this thread中的更多详细信息

          【讨论】:

            【解决方案5】:

            到目前为止,唯一对我有用的方法是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)
            ....
            

            【讨论】:

              猜你喜欢
              • 2021-06-15
              • 2022-01-16
              • 2022-06-16
              • 2021-07-04
              • 2016-06-02
              • 2020-12-08
              • 2020-05-11
              • 2021-01-08
              • 2020-06-22
              相关资源
              最近更新 更多