*由于未捕获异常而终止应用程序';n内部一致性异常';在iOS中 ***由于未捕获异常“NSInternalInconsistencyException”而终止应用程序, 原因:“无法在捆绑包中加载NIB: 'NSBundle(已加载)' 名称为“1KQ-aR-y8O-view-UPI-Ak-bBq” 和目录“Main.storyboardc” ***第一次抛出调用堆栈: ( 0 CoreFoundation 0x000000010a90ee65例外预处理+165 1 libobjc.A.dylib 0x0000000109B12DB objc_异常_抛出+48 2 CoreFoundation 0x000000010a90ed9d+[N异常提升:格式:][205 3 UIKit 0x0000000107dfa3cf-[UINib实例化所有者:选项:][499 4 UIKit 0x0000000107bd3eea-[UIViewController\u loadViewFromNibNamed:bundle:][381 5 UIKit 0x0000000107bd4816-[UIViewController loadView]+178 6 UIKit 0x0000000107bd4b74-[UIViewController loadViewIfRequired]+138 7 UIKit 0x0000000107bdaf4f-[UIViewController\uuu视图将出现:][120 8 UIKit 0x0000000107c0ae44-[UINavigationController\u startCustomTransition:+1203 9 UIKit 0x0000000107c1b23f-[UINavigationController\u STARTDEFERREEDTRANSION(如果需要):+712 10 UIKit 0x0000000107c1c3af-[UINavigationController\uuu视图将布局子视图]+57 11 UIKit 0x0000000107dc2ff7-[UILayoutContainerView布局子视图]+248 12 UIKit 0x0000000107af54a3-[UIView(CALayerDelegate)布局层的子层:+703 13夸脱核心0x000000010c24f59a-[CALayer布局子层]+146 14夸脱核心0x000000010c243e70(如果需要)ZN2CA516层布局交易+366 15 QuartzCore 0x000000010c243cee\u ZN2CA58层布局和显示(如果需要)PNS\u 11事务+24 16 QuartzCore 0x000000010c238475_ZN2CA7Context18提交交易PNS_11交易+277 17夸脱矿0x000000010c265c0a_ZN2CA11交易承诺+486 18 QuartzCore 0x000000010c26637c_ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv+92 19 CoreFoundation 0x000000010a83a367\uuuu CFRUNLOOP\u正在调用\uu OUT\u来调用\uu观察者\uu回调函数\uuuu+23 20 CoreFoundation 0x000000010a83a2d7\uuu cfrunloopdoobserver+391 21 CoreFoundation 0x000000010a82ff2b\uuU CFRunLoopRun+1147 22 CoreFoundation 0x000000010a82f828 CFRunLoopRunSpecific+488 23图形服务0x000000010bd04ad2 GSEventRunModal+161 24 UIKit 0x0000000107a3e610 UIApplicationMain+171 25 baajna 0x000000010785e61f干管+111 26 libdyld.dylib 0x000000010e92e92d开始+1 27°?0x0000000000000001 0x0+1 ) libc++abi.dylib:以NSException类型的未捕获异常终止

*由于未捕获异常而终止应用程序';n内部一致性异常';在iOS中 ***由于未捕获异常“NSInternalInconsistencyException”而终止应用程序, 原因:“无法在捆绑包中加载NIB: 'NSBundle(已加载)' 名称为“1KQ-aR-y8O-view-UPI-Ak-bBq” 和目录“Main.storyboardc” ***第一次抛出调用堆栈: ( 0 CoreFoundation 0x000000010a90ee65例外预处理+165 1 libobjc.A.dylib 0x0000000109B12DB objc_异常_抛出+48 2 CoreFoundation 0x000000010a90ed9d+[N异常提升:格式:][205 3 UIKit 0x0000000107dfa3cf-[UINib实例化所有者:选项:][499 4 UIKit 0x0000000107bd3eea-[UIViewController\u loadViewFromNibNamed:bundle:][381 5 UIKit 0x0000000107bd4816-[UIViewController loadView]+178 6 UIKit 0x0000000107bd4b74-[UIViewController loadViewIfRequired]+138 7 UIKit 0x0000000107bdaf4f-[UIViewController\uuu视图将出现:][120 8 UIKit 0x0000000107c0ae44-[UINavigationController\u startCustomTransition:+1203 9 UIKit 0x0000000107c1b23f-[UINavigationController\u STARTDEFERREEDTRANSION(如果需要):+712 10 UIKit 0x0000000107c1c3af-[UINavigationController\uuu视图将布局子视图]+57 11 UIKit 0x0000000107dc2ff7-[UILayoutContainerView布局子视图]+248 12 UIKit 0x0000000107af54a3-[UIView(CALayerDelegate)布局层的子层:+703 13夸脱核心0x000000010c24f59a-[CALayer布局子层]+146 14夸脱核心0x000000010c243e70(如果需要)ZN2CA516层布局交易+366 15 QuartzCore 0x000000010c243cee\u ZN2CA58层布局和显示(如果需要)PNS\u 11事务+24 16 QuartzCore 0x000000010c238475_ZN2CA7Context18提交交易PNS_11交易+277 17夸脱矿0x000000010c265c0a_ZN2CA11交易承诺+486 18 QuartzCore 0x000000010c26637c_ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv+92 19 CoreFoundation 0x000000010a83a367\uuuu CFRUNLOOP\u正在调用\uu OUT\u来调用\uu观察者\uu回调函数\uuuu+23 20 CoreFoundation 0x000000010a83a2d7\uuu cfrunloopdoobserver+391 21 CoreFoundation 0x000000010a82ff2b\uuU CFRunLoopRun+1147 22 CoreFoundation 0x000000010a82f828 CFRunLoopRunSpecific+488 23图形服务0x000000010bd04ad2 GSEventRunModal+161 24 UIKit 0x0000000107a3e610 UIApplicationMain+171 25 baajna 0x000000010785e61f干管+111 26 libdyld.dylib 0x000000010e92e92d开始+1 27°?0x0000000000000001 0x0+1 ) libc++abi.dylib:以NSException类型的未捕获异常终止,ios,objective-c,xcode,uinavigationcontroller,storyboard,Ios,Objective C,Xcode,Uinavigationcontroller,Storyboard,我在堆栈溢出中没有得到预期的答案。别人问我时,我尝试了他们所说的一切。但无法解决我的问题。请大家帮我从箱子里拿出来。提前感谢如果您是从故事板加载视图,那么您应该使用storyboard Object.InstanceEviewController WithiIdentifier(“故事板标识符”)。据我所知,nib应该只在单独的XIB上工作。如果您是从故事板加载视图,那么您应该使用故事板对象。InstanceEviewController WithiIdentifier(“故事板标识符”)。据我

我在堆栈溢出中没有得到预期的答案。别人问我时,我尝试了他们所说的一切。但无法解决我的问题。请大家帮我从箱子里拿出来。提前感谢

如果您是从故事板加载视图,那么您应该使用storyboard Object.InstanceEviewController WithiIdentifier(“故事板标识符”)。据我所知,nib应该只在单独的XIB上工作。如果您是从故事板加载视图,那么您应该使用故事板对象。InstanceEviewController WithiIdentifier(“故事板标识符”)。据我所知,如果加载nib UIView,nib只能在单独的XIB上工作。按照以下步骤操作


打开XCode目标->转到“构建阶段”选项卡->单击“复制捆绑资源”部分->单击添加按钮->添加缺少的Nib文件(如果加载Nib UIView)。按照以下步骤操作


打开XCode目标->转到“构建阶段”选项卡->单击“复制捆绑资源”部分->单击添加按钮->添加缺少的Nib文件

您可以提供一些代码来说明如何创建
UIViewController
?你在故事板中是如何命名的?我又使用了15个UIViewController,其中一些是HomeController.h ArtisController.h AlbController.h,还有.m文件,通常是Remove从故事板中删除视图,然后再次添加引用。有时它会在内存中保存一些引用…请编写相应的代码,在其中可以发现此崩溃。可能是您的文件名不匹配。我检查了所有文件名。所有文件名都正常。当我启动我的应用程序时,它工作得很好。在一些视图控制器访问后,它因提供的错误而崩溃。您能否提供一些代码,说明如何创建您的
UIViewController
?你在故事板中是如何命名的?我又使用了15个UIViewController,其中一些是HomeController.h ArtisController.h AlbController.h,还有.m文件,通常是Remove从故事板中删除视图,然后再次添加引用。有时它会在内存中保存一些引用…请编写相应的代码,在其中可以发现此崩溃。可能是您的文件名不匹配。我检查了所有文件名。所有文件名都正常。当我启动我的应用程序时,它工作得很好。在一些视图控制器访问后,它因提供的错误而崩溃
 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', 
 reason: 'Could not load NIB in bundle: 
'NSBundle    </Users/xxxx/Library/Developer/CoreSimulator/Devices/726F2DC0-0653-4335-   93DD-40AFB9A00CB9/
data/Containers/Bundle/Application/3AD9B7CD-BB77-4676-B72D-D6504468A389/xxxx.app> (loaded)'
with name '1KQ-aR-y8O-view-UPI-Ak-bBq' 
and directory 'Main.storyboardc'' 
*** First throw call stack:
(
0   CoreFoundation                      0x000000010a90ee65 __exceptionPreprocess + 165
1   libobjc.A.dylib                     0x0000000109b12deb objc_exception_throw + 48
2   CoreFoundation                      0x000000010a90ed9d +[NSException raise:format:] + 205
3   UIKit                               0x0000000107dfa3cf -[UINib instantiateWithOwner:options:] + 499
4   UIKit                               0x0000000107bd3eea -[UIViewController _loadViewFromNibNamed:bundle:] + 381
5   UIKit                               0x0000000107bd4816 -[UIViewController loadView] + 178
6   UIKit                               0x0000000107bd4b74 -[UIViewController loadViewIfRequired] + 138
7   UIKit                               0x0000000107bdaf4f -[UIViewController __viewWillAppear:] + 120
8   UIKit                               0x0000000107c0ae44 -[UINavigationController _startCustomTransition:] + 1203
9   UIKit                               0x0000000107c1b23f -[UINavigationController _startDeferredTransitionIfNeeded:] + 712
10  UIKit                               0x0000000107c1c3af -[UINavigationController __viewWillLayoutSubviews] + 57
11  UIKit                               0x0000000107dc2ff7 -[UILayoutContainerView layoutSubviews] + 248
12  UIKit                               0x0000000107af54a3 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 703
13  QuartzCore                          0x000000010c24f59a -[CALayer layoutSublayers] + 146
14  QuartzCore                          0x000000010c243e70 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 366
15  QuartzCore                          0x000000010c243cee _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24
16  QuartzCore                          0x000000010c238475 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 277
17  QuartzCore                          0x000000010c265c0a _ZN2CA11Transaction6commitEv + 486
18  QuartzCore                          0x000000010c26637c _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 92
19  CoreFoundation                      0x000000010a83a367 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
20  CoreFoundation                      0x000000010a83a2d7 __CFRunLoopDoObservers + 391
21  CoreFoundation                      0x000000010a82ff2b __CFRunLoopRun + 1147
22  CoreFoundation                      0x000000010a82f828 CFRunLoopRunSpecific + 488
23  GraphicsServices                    0x000000010bd04ad2 GSEventRunModal + 161
24  UIKit                               0x0000000107a3e610 UIApplicationMain + 171
25  baajna                              0x000000010785e61f main + 111
26  libdyld.dylib                       0x000000010e92e92d start + 1
27  ???                                 0x0000000000000001 0x0 + 1
 )
 libc++abi.dylib: terminating with uncaught exception of type NSException