我收到有关架构armv7的重复符号的错误。在我的~/Library/Developer/Xcode/DerivedData/Lyearn-grsqfwtcaisfvocmxxxiqgoezpco/Build/Products/Debug-iphoneos
中,存在以下文件:
libEGOCache.a
libPods-EGOCache.a
libPods-UAProgressView.a
libSDWebImage.a
libFSImageViewer.a
libPods-FSImageViewer.a
libPods-WebASDKImageManager.a
libUAProgressView.a
libPods-AFNetworking.a
libPods-ICViewPager.a
libPods-pop.a
libWebASDKImageManager.a
libPods-AsyncDisplayKit.a
libPods-SDWebImage.a
libPods.a
libpop.a
看起来这看起来不是libPods-XXX.a和libXXX.a都应该存在或者应该包括在内。我的项目很快。我有一个目标c中的文件。为了让这个文件能够访问swift类,我加入了APPNAME-Swift.h
。此外,我已将所有这些包含在APPNAME-Bridging-Header.h
中,因为它是Swift类所要求的。我从PodFile中删除了一个pod库后出现了这个问题并且pod install
如何删除它?
我检查了this问题,但它说我正在导入.m文件,而我没有这样做,我总是只使用.h文件
编辑#1
我尝试从二进制链接库中删除libPods.a并编译代码。我删除了一个库,问题又回来了。从PodFile中删除库并执行pod install
libPods.a`后,自动包含在链接二进制库中。我尝试再次删除它但仍然收到错误。
执行此操作后,我收到了新错误:
ld: warning: directory not found for option '-L/Users/USERNAME/APP-NAME/build/Debug-iphoneos'
ld: library not found for -lPods-AFNetworking
在看到答案here并将后一条目从图书馆搜索路径中移除到刚刚($ inherited)后,删除了第一个错误,现在只是收到lPods-AFNetworking错误。
这是错误日志:
Ld /Users/USERNAME/Library/Developer/Xcode/DerivedData/APP-NAME-grsqfwtcaisfvocmxxxiqgoezpco/Build/Products/Debug-iphoneos/APP-NAME.app/APP-NAME normal armv7
cd /Users/USERNAME/APP-NAME-ios
export IPHONEOS_DEPLOYMENT_TARGET=7.1
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.4.sdk -L/Users/USERNAME/Library/Developer/Xcode/DerivedData/APP-NAME-grsqfwtcaisfvocmxxxiqgoezpco/Build/Products/Debug-iphoneos -F/Users/USERNAME/Library/Developer/Xcode/DerivedData/APP-NAME-grsqfwtcaisfvocmxxxiqgoezpco/Build/Products/Debug-iphoneos -F/Users/USERNAME/APP-NAME-ios -F/Users/USERNAME/APP-NAME-ios/Frameworks -filelist /Users/USERNAME/Library/Developer/Xcode/DerivedData/APP-NAME-grsqfwtcaisfvocmxxxiqgoezpco/Build/Intermediates/APP-NAME.build/Debug-iphoneos/APP-NAME.build/Objects-normal/armv7/APP-NAME.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -ObjC -lAFNetworking -lAsyncDisplayKit -lEGOCache -lFSImageViewer -lICViewPager -lSDWebImage -lUAProgressView -lWebASDKImageManager -lc++ -lpop -framework AssetsLibrary -framework CFNetwork -framework CoreGraphics -framework Foundation -framework ImageIO -framework MobileCoreServices -framework QuartzCore -framework Security -framework SystemConfiguration -framework UIKit -weak_framework Photos -ObjC -lPods-AFNetworking -framework CoreGraphics -framework MobileCoreServices -framework Security -framework SystemConfiguration -all_load -fobjc-arc -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -Xlinker -force_load -Xlinker /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a -Xlinker -add_ast_path -Xlinker /Users/USERNAME/Library/Developer/Xcode/DerivedData/APP-NAME-grsqfwtcaisfvocmxxxiqgoezpco/Build/Intermediates/APP-NAME.build/Debug-iphoneos/APP-NAME.build/Objects-normal/armv7/APP-NAME.swiftmodule -miphoneos-version-min=7.1 -framework Security -framework Foundation -framework UIKit -framework Social -framework Accounts -lsqlite3 -framework Crashlytics -lz -framework SystemConfiguration -framework DBChooser -framework StoreKit -framework QuartzCore -framework MobileCoreServices -framework CoreLocation -framework Fabric -framework Bolts -framework CoreGraphics -framework GooglePlus -framework CFNetwork -framework AudioToolbox -lPods -Xlinker -dependency_info -Xlinker /Users/USERNAME/Library/Developer/Xcode/DerivedData/APP-NAME-grsqfwtcaisfvocmxxxiqgoezpco/Build/Intermediates/APP-NAME.build/Debug-iphoneos/APP-NAME.build/Objects-normal/armv7/APP-NAME_dependency_info.dat -o /Users/USERNAME/Library/Developer/Xcode/DerivedData/APP-NAME-grsqfwtcaisfvocmxxxiqgoezpco/Build/Products/Debug-iphoneos/APP-NAME.app/APP-NAME
ld: library not found for -lPods-AFNetworking
clang: error: linker command failed with exit code 1 (use -v to see invocation)
看起来它正试图包含-lAFNetworking和-lPods-AFNetworking。
答案 0 :(得分:0)
问题解决了。我有一个问题,主要是因为更新了cocoapods。以某种方式更新cocoapods创建了两个版本的cocoapods。完全卸载并重新安装cocoapods修复了pod安装后的问题。