我是应用程序开发的初学者。我正在制作一个带有颤振的应用程序,下面的错误发生在用ios构建的时候。
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
以下是结果
/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:
===============================================
当我在真正的android设备上运行这个应用程序时,我发现了与facebook相关的消息
发布于 2022-07-02 09:14:46
我通过以下操作解决此错误
platform :ios, '12.0'
和config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '12.0'
更新Podfile我还将项目中的iOS部署目标设置为12.0。
发布于 2022-10-30 05:59:55
https://github.com/darwin-morocho/flutter-facebook-auth/issues/299
我修改了我的文件夹
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)
错误发生如下所示:
FIRStorageTypedefs.h:29:19: note: declaration here is not visible
typedef NSString *FIRStorageHandle NS_SWIFT_NAME(StorageHandle);
所以我做了吊舱卸载,更新,安装,更新,安装……T___T
arch -x86_64 pod update
arch -x86_64 pod install
然后像这样改变这些版本
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
增添:
$xcode-select --install
error: command line tools are already installed
sudo arch -x86_64 gem install ffi
sudo arch -arm64 gem pristine ffi
感谢每个人
https://stackoverflow.com/questions/72632323
复制相似问题