如何修复Apple Mach-O链接器(ld)错误组 - ld:找不到-lFBSDKCoreKit的库

问题描述 投票:0回答:1

现在已经好几天我得到了这个错误,我尝试了几个解决方案,如:

  • 我总是打开.xcworkspace文件
  • 我总是清理项目并重新启动
  • 我总是重启xcode并重新启动
  • 我从.xconfig文件中删除库搜索路径 重新开张
  • 我从.xconfig文件中删除OTHER_LDFLAGS并重新启动
  • 我从DerivedData中删除了应用程序的文件夹

我的pod文件内容:

pod 'Firebase'
pod 'Bolts'
pod 'Firebase/Firestore'
pod 'GoogleMobileAds'
pod 'Fabric'
pod 'Crashlytics'
pod 'PersonalizedAdConsent'
pod 'Highcharts', '~> 6.1.0'
pod 'FBSDKCoreKit'
pod 'GoogleToolboxForMac'
pod 'FirebaseAnalytics'

完整的错误:

Ld /Users/macbook/Library/Developer/Xcode/DerivedData/MyApp-gydeutwlcipqlofsryockyhughug/Build/Products/Debug-iphoneos/MyApp.app/MyApp normal arm64
    cd "/Users/macbook/Documents/app ios /MyApp New"
    export IPHONEOS_DEPLOYMENT_TARGET=11.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk -L/Users/macbook/Library/Developer/Xcode/DerivedData/MyApp-gydeutwlcipqlofsryockyhughug/Build/Products/Debug-iphoneos -F/Users/macbook/Library/Developer/Xcode/DerivedData/MyApp-gydeutwlcipqlofsryockyhughug/Build/Products/Debug-iphoneos -F/Users/macbook/Documents/app\ ios\ /MyApp\ New -filelist /Users/macbook/Library/Developer/Xcode/DerivedData/MyApp-gydeutwlcipqlofsryockyhughug/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/MyApp.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=11.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/macbook/Library/Developer/Xcode/DerivedData/MyApp-gydeutwlcipqlofsryockyhughug/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/MyApp_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-arc -fobjc-link-runtime -ObjC -lBoringSSL -lFBSDKCoreKit -lGoogleToolboxForMac -lProtobuf -lc++ -lgRPC -lgRPC-Core -lgRPC-ProtoRPC -lgRPC-RxLibrary -lleveldb-library -lnanopb -lsqlite3 -lz -framework AVFoundation -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreMedia -framework CoreMotion -framework CoreTelephony -framework CoreVideo -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseCoreDiagnostics -framework FirebaseFirestore -framework FirebaseInstanceID -framework FirebaseNanoPB -framework GLKit -framework GoogleMobileAds -framework MediaPlayer -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework QuartzCore -framework Security -framework StoreKit -framework SystemConfiguration -weak_framework Accounts -weak_framework AdSupport -weak_framework AudioToolbox -weak_framework CoreGraphics -weak_framework CoreLocation -weak_framework Foundation -weak_framework JavaScriptCore -weak_framework QuartzCore -weak_framework SafariServices -weak_framework Security -weak_framework Social -weak_framework UIKit -weak_framework WebKit -framework FBSDKCoreKit -framework WebKit -framework AVFoundation -framework CoreMedia -framework QuartzCore -framework AdSupport -framework CoreGraphics -framework SystemConfiguration -framework CoreTelephony -framework StoreKit -framework CoreFoundation -framework Foundation -framework GoogleMobileAds -framework CoreData -framework UIKit -Xlinker -dependency_info -Xlinker /Users/macbook/Library/Developer/Xcode/DerivedData/MyApp-gydeutwlcipqlofsryockyhughug/Build/Intermediates.noindex/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/MyApp_dependency_info.dat -o /Users/macbook/Library/Developer/Xcode/DerivedData/MyApp-gydeutwlcipqlofsryockyhughug/Build/Products/Debug-iphoneos/MyApp.app/MyApp

ld: library not found for -lFBSDKCoreKit
clang: error: linker command failed with exit code 1 (use -v to see invocation)

请帮我修复这个错误

ios xcode cocoapods fbsdk
1个回答
0
投票

从Build Settings重新安装/更新pods和Build Active Architecture OnlyYes

© www.soinside.com 2019 - 2024. All rights reserved.