首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >颤振没有这样的模块'FBSDKCoreKit‘错误

颤振没有这样的模块'FBSDKCoreKit‘错误
EN

Stack Overflow用户
提问于 2022-06-15 13:26:37
回答 2查看 314关注 0票数 2

我是应用程序开发的初学者。我正在制作一个带有颤振的应用程序,下面的错误发生在用ios构建的时候。

代码语言:javascript
运行
复制
Uncategorized (Xcode): Command CompileSwift failed with a nonzero exit code

Swift Compiler Error (Xcode): No such module 'FBSDKCoreKit'
/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:8:7
2

Could not build the application for the simulator.
Error launching application on iPhone 12.
Exited (sigterm)

但我从未安装过facebook_auth软件包。我的flutter_facebook_auth文件中也没有pubspec.yaml。

但我一直在犯上面的错误。有什么解决办法吗?感谢您的阅读。

===============================================================

我做了flutter clean -> flutter pub get -> cd ios -> pod install -> run

以下是结果

代码语言:javascript
运行
复制
/Users/development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-1.1.0/ios/Classes/CompressFileHandler.m:109:16: warning: unused variable 'swf' [-Wunused-variable]
        const char swf[3] = {'F', 'W', 'S'};
                   ^
    /Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_image_compress-1.1.0/ios/Classes/CompressFileHandler.m:110:16: warning: unused variable 'swc' [-Wunused-variable]
        const char swc[3] = {'C', 'W', 'S'};
                   ^
    4 warnings generated.
    warning: [CP] Unable to find matching .xcframework slice in 'ios-arm64 ios-arm64_x86_64-simulator ios-arm64_x86_64-maccatalyst' for the current build architectures (arm64 x86_64 i386).
    Command CompileSwift failed with a nonzero exit code
    /Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:9:8: error: no such module 'FBSDKCoreKit'
    import FBSDKCoreKit
           ^
    /Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:9:8: error: no such module 'FBSDKCoreKit'
    import FBSDKCoreKit
           ^
    /Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:9:8: error: no such module 'FBSDKCoreKit'
    import FBSDKCoreKit
           ^
    note: Using new build system
    note: Building targets in parallel
    note: Planning build
    note: Analyzing workspace
    note: Constructing build description
    note: Build preparation complete
    warning: Skipping duplicate build file in Copy Bundle Resources build phase: /Users//Downloads/GoogleService-Info.plist (in target 'Runner' from project 'Runner')
    Result bundle written to path:
        /var/folders/ly/7jxqf41945g08nj820kfkblr0000gn/T/flutter_tools.QgWT3r/flutter_ios_build_temp_diruHeVSi/temporary_xcresult_bundle
Uncategorized (Xcode): Command CompileSwift failed with a nonzero exit code

Swift Compiler Error (Xcode): No such module 'FBSDKCoreKit'
/Users//development/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:8:7
2

Could not build the application for the simulator.
Error launching application on iPhone 12.

吊舱安装效果良好。这是吊舱安装结果的一部分。

================================================= pub.dartlang.org/flutter_facebook_auth-4.3.3/ios/Classes/FacebookAuth.swift:8:7 File contents:

facebookauth.swift文件内容

===============================================

当我在真正的android设备上运行这个应用程序时,我发现了与facebook相关的消息

在android设备上运行时出错

EN

回答 2

Stack Overflow用户

发布于 2022-07-02 09:14:46

我通过以下操作解决此错误

  1. 去除Podfile.lock和Pods
  2. platform :ios, '12.0'config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'更新Podfile
  3. 吊舱安装

我还将项目中的iOS部署目标设置为12.0。

票数 0
EN

Stack Overflow用户

发布于 2022-10-30 05:59:55

https://github.com/darwin-morocho/flutter-facebook-auth/issues/299

我修改了我的文件夹

代码语言:javascript
运行
复制
platform :ios, '11.0'
and config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0' (in my case, both version were not same. 11.0 <-> 9.0)

错误发生如下所示:

代码语言:javascript
运行
复制
FIRStorageTypedefs.h:29:19: note: declaration here is not visible
    typedef NSString *FIRStorageHandle NS_SWIFT_NAME(StorageHandle);

所以我做了吊舱卸载,更新,安装,更新,安装……T___T

代码语言:javascript
运行
复制
arch -x86_64 pod update
arch -x86_64 pod install

然后像这样改变这些版本

代码语言:javascript
运行
复制
  firebase_auth: 4.1.0
  firebase_core: 2.1.1
  cloud_firestore: 4.0.3
  firebase_storage: 11.0.3
  firebase_messaging: 14.0.3
  cloud_functions: 4.0.3
  firebase_remote_config: 3.0.3

增添:

  1. 我的Xcode命令行工具已经安装好了
代码语言:javascript
运行
复制
$xcode-select --install
error: command line tools are already installed
  1. 安装ffi..。都失败了
代码语言:javascript
运行
复制
sudo arch -x86_64 gem install ffi
sudo arch -arm64 gem pristine ffi

感谢每个人

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

https://stackoverflow.com/questions/72632323

复制
相关文章

相似问题

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