Could not load NIB in bundle: 'NSBundle.....

本文解决了NSNotificationDemo项目中ViewController NIB加载失败的问题,通过修改AppDelegate的didFinishLaunchingWithOptions方法,成功解决了NSInternalInconsistencyException异常。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

学习NSNotification时遇到了这个问题,错误日志如下:

2015-08-28 17:47:24.617 NSNotificationDemo[7158:786614] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </private/var/mobile/Containers/Bundle/Application/18D95FA1-2AA9-48B8-9528-4FD9B9B65B75/NSNotificationDemo.app> (loaded)' with name 'ViewController''
*** First throw call stack:
(0x287910d7 0x36c23c77 0x2879101d 0x2c1c32a9 0x2c0da987 0x2bf0e6dd 0x2bdf2349 0x2bdf22cd 0x2bdf83f7 0x2bdf5d6f 0x2be60e91 0xebad9 0x2be5dc85 0x2c05426b 0x2c05690f 0x2c0615e9 0x2c0550c7 0x2f265ec1 0x28757035 0x287562f9 0x28754e53 0x286a06d1 0x286a04e3 0x2be57867 0x2be52445 0xebc3d 0x371f1aaf)
libc++abi.dylib: terminating with uncaught exception of type NSException

 

下面两个网址提到了这个问题,检查过之后问题依旧存在,目前还在寻求解决方法中……

1. http://blog.youkuaiyun.com/itianyi/article/details/8547895

2. http://www.cocoachina.com/bbs/read.php?tid=265037

 

总算找到解决方法了!把AppDelegate的application:didFinishLaunchingWithOptions:方法中原来的内容注释或删除就OK了 !

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    return YES;
}

至于原因,觉得应该是版本的问题把……

 

附上Demo的下载地址  http://download.youkuaiyun.com/detail/jk199054/4077865,介绍的很不错!简洁明了!

转载于:https://www.cnblogs.com/jaxer/p/4767539.html

03-14 00:20:36.042: E/nfq(5377): Failed to copy the file: content://media/external/file/1000000043 03-14 00:20:36.042: E/nfq(5377): nep: Error opening src/target doc in file copy 03-14 00:20:36.042: E/nfq(5377): at nfq.b(PG:689) 03-14 00:20:36.042: E/nfq(5377): at nfq.f(PG:17) 03-14 00:20:36.042: E/nfq(5377): at jnl.a(PG:240) 03-14 00:20:36.042: E/nfq(5377): at qac.a(PG:57) 03-14 00:20:36.042: E/nfq(5377): at pzo.e(PG:3) 03-14 00:20:36.042: E/nfq(5377): at pzq.run(PG:42) 03-14 00:20:36.042: E/nfq(5377): at lad.run(PG:3) 03-14 00:20:36.042: E/nfq(5377): at pxg.run(PG:50) 03-14 00:20:36.042: E/nfq(5377): at kny.run(PG:25) 03-14 00:20:36.042: E/nfq(5377): at java.lang.Thread.run(Thread.java:1012) 03-14 00:20:36.042: E/nfq(5377): at law.run(PG:64) 03-14 00:20:36.042: E/nfq(5377): Caused by: java.io.IOException: android.system.ErrnoException: fsync failed: EIO (I/O error) 03-14 00:20:36.042: E/nfq(5377): at nib.close(PG:43) 03-14 00:20:36.042: E/nfq(5377): at nfq.b(PG:248) 03-14 00:20:36.042: E/nfq(5377): ... 10 more 03-14 00:20:36.042: E/nfq(5377): Caused by: android.system.ErrnoException: fsync failed: EIO (I/O error) 03-14 00:20:36.042: E/nfq(5377): at libcore.io.Linux.fsync(Native Method) 03-14 00:20:36.042: E/nfq(5377): at libcore.io.ForwardingOs.fsync(ForwardingOs.java:271) 03-14 00:20:36.042: E/nfq(5377): at libcore.io.BlockGuardOs.fsync(BlockGuardOs.java:206) 03-14 00:20:36.042: E/nfq(5377): at libcore.io.ForwardingOs.fsync(ForwardingOs.java:271) 03-14 00:20:36.042: E/nfq(5377): at android.system.Os.fsync(Os.java:202) 03-14 00:20:36.042: E/nfq(5377): at nib.close(PG:19) 分析下拷贝文件到sd卡失败问题
03-15
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值