我正在尝试使用iOS 6(iPhone 4)在设备中进行调试,但收到错误。下面是它的完整日志。谁有人解释这个?感谢
Ld /Users/xyz/Desktop/app-ebcjtnqmxrkylhalerydbplwewus/Build/Intermediates/app.build/Debug-iphoneos/app.build/Objects-normal/armv7s/app normal armv7s
cd "/Users/folder/Desktop/4.0 app 1010"
setenv IPHONEOS_DEPLOYMENT_TARGET 4.0
setenv PATH "/Volumes/Xcode 1/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Volumes/Xcode 1/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
"/Volumes/Xcode 1/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -arch armv7s -isysroot "/Volumes/Xcode 1/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk" -L/Users/folder/Desktop/app-ebcjtnqmxrkylhalerydbplwewus/Build/Products/Debug-iphoneos "-L/Users/folder/Desktop/4.0 app 1010/Twitter+OAuth/SAOAuthTwitterEngine" -F/Users/folder/Desktop/app-ebcjtnqmxrkylhalerydbplwewus/Build/Products/Debug-iphoneos "-F/Users/folder/Desktop/4.0 app 1010" -filelist /Users/folder/Desktop/app-ebcjtnqmxrkylhalerydbplwewus/Build/Intermediates/app.build/Debug-iphoneos/app.build/Objects-normal/armv7s/app.LinkFileList -dead_strip -ObjC -all_load -fobjc-link-runtime -miphoneos-version-min=4.0 -framework EventKit -framework MobileCoreServices -framework CFNetwork -framework MessageUI -framework MapKit -framework CoreData -framework CoreLocation -framework AVFoundation -framework AudioToolbox -framework Foundation -framework UIKit -framework BugSense-iOS -framework CoreGraphics -framework MediaPlayer -framework SystemConfiguration -lz.1.1.3 -lxml2 -weak-lSystem -lsqlite3 -o /Users/folder/Desktop/app-ebcjtnqmxrkylhalerydbplwewus/Build/Intermediates/app.build/Debug-iphoneos/app.build/Objects-normal/armv7s/app
ld: warning: directory not found for option '-L/Users/folder/Desktop/4.0 app 1010/Twitter+OAuth/SAOAuthTwitterEngine'
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/folder/Desktop/4.0 app 1010/BugSense-iOS.framework/BugSense-iOS for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
(null): Directory not found for option '-L/Users/folder/Desktop/4.0 app 1010/Twitter+OAuth/SAOAuthTwitterEngine'
(null): File is universal (3 slices) but does not contain a(n) armv7s slice: /Users/folder/Desktop/4.0 app 1010/BugSense-iOS.framework/BugSense-iOS for architecture armv7s
(null): Linker command failed with exit code 1 (use -v to see invocation)
答案 0 :(得分:2)
看起来你正在使用尚未针对iPhone 5中使用的armv7s(请注意's')进行优化的第三方库“bugsense”。您需要获取更新的bugsense SDK或从中删除armv7s项目“构建设置”中的“架构”。
答案 1 :(得分:2)
“文件是通用的(3个切片)但不包含(n)armv7s切片:”它实际上说明了问题所在。 BugSense框架不是用armv7s作为支持的架构构建的。错误中提到的3个切片很可能是armv6,armv7和i386(模拟器)。
当您构建应用程序或静态库时,您必须设置要支持的体系结构,请参阅构建设置 - >架构。这涉及iPhone的处理器,iPhone 3G和更低的ARM6处理器,iPhone 3GS到4S有ARM7,现在iPhone5有ARM7s。自Xcode 4.5以来,对armv6的支持已经下降,默认情况下armv7s被添加到Build Settings体系结构中。
基本上,您的项目支持armv7s,而您尝试使用的库则不支持。请联系此库的开发人员并要求添加对armv7的支持,或者如果您可以自己构建库,请将armv7添加到构建设置中的体系结构列表并重建。或者您也可以设置“仅构建活动体系结构”进行调试。