1.
ld: file is universal (3 slices) but does not contain a(n) armv7s slice: /Users/yangares/Desktop/二維碼/ZBarSDK/libzbar.a file '/Users/yangares/Desktop/二維碼/ZBarSDK/libzbar.a' for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
armv7 armv7s
2 iOS真機調試程序 時間上是手機不是開發而後不是開飯着證書
報以下錯誤信息
failed to get the task for process XXX
緣由:證書問題,project和targets的證書都必須是開發證書,ADHOC的證書會出現此問題。
process lauch failed:failed to get the task for process
project和targets的證書
使用開發證書。
3.
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_AMapView", referenced from:
objc-class-ref in libMAMapKit.a(MAMapView.o)
ld: symbol(s) not found for architecture armv7s
大致意思是:引用自XX.a靜態庫的XX類不支持armv7s指令
緣由是:你引用的靜態庫確實不支持armv7s,那麼你要想順利編譯經過,要麼通知開發修改,等待支持了以後再測;要麼在target的build settings中的valid Architectures 將armv7s先暫時去掉,編譯就能夠成功。
4.arc 非arc 混編事
在targets的build phases選項下Compile Sources下選擇要不使用arc編譯的文件,雙擊它,輸入 -fno-objc-arc 便可
MRC工程中也可使用ARC的類。方法以下:
在targets的build phases選項下Compile Sources下選擇要使用arc編譯的文件,雙擊它,輸入 -fobjc-arc 便可
error: Couldn't materialize struct: the variable 'pParse' has no location, it may have been optimized out
Errored out in Execute, couldn't PrepareToExecuteJITExpression
錯誤:沒法實現結構:變量「pParse沒有位置,它可能已經優化了
錯誤在執行,不能preparetoexecutejitexpression
錯誤
1.找不到模擬器的緣由:(iOS Deployment Target設置不對
)選擇Info下的Deployment Target並把iOS Deployment Target設置爲比你模擬器版本更低的值便可
The run destination iPhone Retina (3.5-inch) is not valid for Running the scheme 'XiangYing0610'
#ifdef __OBJC__ 宏定義的做用
表示宏內引用的文件確保只被使用Objective-C語言的文件所引用,保證引用關係的清晰。
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386).
沒有架構編制(only_active_arch =是的,主動拱= x86_64,valid_archs = i386)。
解救方法buildsetting ->build active architecture only 改稱no
missing required architecture i386
解決方法
可能緣由二:正如這個錯誤提示所指出的那樣,缺乏了
i386
架構的東西。這極可能是因爲項目中包含的靜態庫是被編譯用於真機測試
的,你們都知道蘋果手機
cpu
是
arm
架構,而
mac
筆記本(固然也包括運行於其上的
iphone
-
simulator
)是
intel
架構。因此當這個靜
態庫被編譯用於
device
的時候,在目標爲
simulator
下的編譯是會報錯的。
解決方法一:
直接真機調試。
解決方法二:
從新爲simulator編譯靜態庫,而後有一個更高端的解決辦法,就是將兩種架構的靜態庫合併:lipo -create Release-iphonesimulator/libMAMapKit.a Release-iphoneos/libMAMapKit.a -output libMAMapKit.a
查看是否支持模擬器 lipo info …a文件
http://ju.outofmemory.cn/entry/7557
Undefined symbols for architecture armv7:
"signMessage(NSString**, NSString const*, NSString const*, NSString const*, int)", referenced from:
-[tztkhInfosec tztCertSignData:nSignType:] in tztkhInfosec.o
有些是引入別的證書庫的問題可是沒有刪除掉
invalid preprocessing driective 無效的預處理命令 20150107
?是本地有,服務器沒有添加上去
m
c衝突問題
a添加
static table views are only valid when embedded in uitableviewcontroller instances 靜態表觀只適用在嵌入uitableviewcontroller INS
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_PublicViewController", referenced from:
打斷點不顯示的問題 --》 build settings ->apple LLVM 5.1 -Code Generation ->Generate debug symbols 改爲yes
armv6 設備: iPhone, iPhone2, iPhone3G, 第一代、第二代 iPod Touch
armv7 設備: iPhone3GS, iPhone4, iPhone4S
iPad, iPad2, iPad3(The New iPad), iPad mini
iPod Touch 3G, iPod Touch4
armv7s設備: iPhone5, iPhone5C, iPad4(iPad with Retina Display)
arm64 設備: iPhone5S, iPad Air, iPad mini2(iPad mini with Retina Display)
lipo -info .a 查看庫文件是否支持64位
1, setObject:forkey:中value是不可以爲nil的,否則會報錯。
setValue:forKey:中value可以爲nil,可是當value爲nil的時候,會自動調用removeObject:forKey方法
2, setValue:forKey:中key的參數只可以是NSString類型,而setObject:forKey:的能夠是任何類型