错误集锦

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:的可以是任何类型
mrc 文集 可以使用 -fno-objc-arc 来标识哪些文件不使用ARC机制

转载于:https://www.cnblogs.com/wryAndBlog/p/4397963.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值