如何修复 ios 应用程序因特定名称而崩溃的问题?
我有一个名为“FirstAid”的应用程序,它在模拟器和设备上崩溃。如果我创建一个名为“FirstAid”的干净项目,它也会因相同的报告而崩溃。任何其他命名的应用程序都可以。
我已经完成了清理并重建了它,但它仍然崩溃。
我该如何修复它?
2011-05-14 10:06:39.912 FirstAid[1217:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.' *** Call stack at first throw: ( 0 CoreFoundation 0x00ef55a9 __exceptionPreprocess + 185 1 libobjc.A.dylib 0x01049313 objc_exception_throw + 44 2 CoreFoundation 0x00ef54e1 -[NSException raise] + 17 3 Foundation 0x008c7677 _NSSetUsingKeyValueSetter + 135 4 Foundation 0x008c75e5 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285 5 UIKit 0x0034330c -[UIRuntimeOutletConnection connect] + 112 6 CoreFoundation 0x00e6b8cf -[NSArray makeObjectsPerformSelector:] + 239 7 UIKit 0x00341d23 -[UINib instantiateWithOwner:options:] + 1041 8 UIKit 0x00343ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168 9 UIKit 0x0014917a -[UIApplication _loadMainNibFile] + 172 10 UIKit 0x00149cf4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 291 11 UIKit 0x00154617 -[UIApplication handleEvent:withNewEvent:] + 1533 12 UIKit 0x0014cabf -[UIApplication sendEvent:] + 71 13 UIKit 0x00151f2e _UIApplicationHandleEvent + 7576 14 GraphicsServices 0x013ce992 PurpleEventCallback + 1550 15 CoreFoundation 0x00ed6944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52 16 CoreFoundation 0x00e36cf7 __CFRunLoopDoSource1 + 215 17 CoreFoundation 0x00e33f83 __CFRunLoopRun + 979 18 CoreFoundation 0x00e33840 CFRunLoopRunSpecific + 208 19 CoreFoundation 0x00e33761 CFRunLoopRunInMode + 97 20 UIKit 0x001497d2 -[UIApplication _run] + 623 21 UIKit 0x00155c93 UIApplicationMain + 1160 22 FirstAid 0x00001cb9 main + 121 23 FirstAid 0x00001c35 start + 53 ) terminate called after throwing an instance of 'NSException'
I have an app called "FirstAid" that crashes in the simulator and on a device. If I create a clean project called "FirstAid" that also crashes with the same report. Any other named app is fine.
I have done a clean, and rebuilt it but it still crashes.
How do I fix it?
2011-05-14 10:06:39.912 FirstAid[1217:207] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key view.' *** Call stack at first throw: ( 0 CoreFoundation 0x00ef55a9 __exceptionPreprocess + 185 1 libobjc.A.dylib 0x01049313 objc_exception_throw + 44 2 CoreFoundation 0x00ef54e1 -[NSException raise] + 17 3 Foundation 0x008c7677 _NSSetUsingKeyValueSetter + 135 4 Foundation 0x008c75e5 -[NSObject(NSKeyValueCoding) setValue:forKey:] + 285 5 UIKit 0x0034330c -[UIRuntimeOutletConnection connect] + 112 6 CoreFoundation 0x00e6b8cf -[NSArray makeObjectsPerformSelector:] + 239 7 UIKit 0x00341d23 -[UINib instantiateWithOwner:options:] + 1041 8 UIKit 0x00343ab7 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 168 9 UIKit 0x0014917a -[UIApplication _loadMainNibFile] + 172 10 UIKit 0x00149cf4 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 291 11 UIKit 0x00154617 -[UIApplication handleEvent:withNewEvent:] + 1533 12 UIKit 0x0014cabf -[UIApplication sendEvent:] + 71 13 UIKit 0x00151f2e _UIApplicationHandleEvent + 7576 14 GraphicsServices 0x013ce992 PurpleEventCallback + 1550 15 CoreFoundation 0x00ed6944 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 52 16 CoreFoundation 0x00e36cf7 __CFRunLoopDoSource1 + 215 17 CoreFoundation 0x00e33f83 __CFRunLoopRun + 979 18 CoreFoundation 0x00e33840 CFRunLoopRunSpecific + 208 19 CoreFoundation 0x00e33761 CFRunLoopRunInMode + 97 20 UIKit 0x001497d2 -[UIApplication _run] + 623 21 UIKit 0x00155c93 UIApplicationMain + 1160 22 FirstAid 0x00001cb9 main + 121 23 FirstAid 0x00001c35 start + 53 ) terminate called after throwing an instance of 'NSException'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这个错误可能有多种含义,但我敢打赌,您的某些渠道(来自 IB)已损坏。检查您的 XIB 文件及其所有出口,并确保它们也存在于您的代码中。
This error may mean several things, but my bet is that some of your outlets (from IB) is broken. Examine your XIB-files + all their outlets and make sure they exist in your code as well.