IOS开发中遇到的异常Exception

11 篇文章 0 订阅

NSUnknownKeyException  

在NIB文件中有一个ui元素通过IBOutlet连接到了controller中的某一个对象,但是该对向不存在。最好检查一下controller与NIB文件是否对应。

If you're using NIB files / Interface Builder, what this error message REALLY means is:

"Your NIB file has a GUI element that's connected (via the Outlets screen) to an outlet in one of your source files that doesn't exist"

i.e. it usually happens when you change the name of an IBOutlet variable in your source file, and forget to change your NIB file to reflect the change.

(sadly, Interface Builder isn't good enough to automatically rename the connection, as it is supposed to do - you MUST do it manually)

 

linker command failed with exit code 1 (use -v to see invocation)

解决办法:由于你的Duplicate symbol error 引起的,而Duplicated symbol error的原因是在你删除了pbxproj文件然后重新添加file时造成了文件的多次加入,也就是说一个Proj中某个类写了两次implementation,所以报错。需要在Build Parse中的compile sources中删除掉重复项;

 

Undefined symbols for architecture i386

使用模拟器的时候报这个异常,真机的时候异常中的i386会改成armv7或armv7s,由于相应的类或库没有导入project中,从异常的描述中就可以知道缺少哪个类,导入即可。

 

Could not load NIB in bundle:

nib文件和图片等都是作为资源存在的,抱这个异常需要检查nib是否加入到了project中。点击当前的target,打开第三项,在copy bundle resources中检查是否包含异常中提示未找到的资源,如果没有,加入进去即可。

 

duplicate symbol _OBJC_IVAR_

好几次发生在Reachability上,原因是在调用了多次这个类,在不通过的第三方包里都包含这个类,而程序中只需要一个。

 

 

could not change executable permissions(Could not change executable permissions on the application.)

就是你同一个bundle identifier  往iphone里装了两个程序,冲突了。检查你设备里已安装的应用,是否已有应用使用了这个bundle identifier

 

 libc++abi.dylib: handler threw exception

几次都是数组越界引起的

 

error can‘t alloct region

程序内存的不到分配,可能是内存泄露,系统内存不够用了。我遇到的问题是,需要在for循环里添加@autoreleasepool{}来手动释放循环内的对象,

 

The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile.

找到Targets中的Build Settings选项卡中的Code Signing Entitlements,删除test中该项的值,重新Build即可解决。

详细解决方法:http://stackoverflow.com/questions/5240801/the-entitlements-specified-profile-0xe8008016-error-ios-4-2

 

 

异常解决方法:

http://quding0308.iteye.com/blog/1826289

 

crash解决方式:

http://www.raywenderlich.com/10209/my-app-crashed-now-what-part-1

 

 

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值