我是OBjective C的新手。我正在Xcode中编写一个登录功能。但它崩溃了。寻求帮助!
2016-02-06 03:14:09.331登录[3466:392205] *由于未捕获的异常'NSInternalInconsistencyException'而终止应用程序,原因:'无法在bundle中加载NIB:'NSBundle(loaded)'名字'ViewController'' * 第一次抛出调用堆栈: ( 0 CoreFoundation 0x0000000101b81f45 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x00000001015fbdeb objc_exception_throw + 48
2 CoreFoundation 0x0000000101b81e7d +[NSException raise:format:] + 205
3 UIKit 0x00000001022e4eff -[UINib instantiateWithOwner:options:] + 499
4 UIKit 0x00000001020bfc16 -[UIViewController _loadViewFromNibNamed:bundle:] + 381
5 UIKit 0x00000001020c0542 -[UIViewController loadView] + 178
6 UIKit 0x00000001020c08a0 -[UIViewController loadViewIfRequired] + 138
7 UIKit 0x00000001020c1013 -[UIViewController view] + 27
8 UIKit 0x0000000101f9a51c -[UIWindow addRootViewControllerViewIfPossible] + 61
9 UIKit 0x0000000101f9ac05 -[UIWindow _setHidden:forced:] + 282
10 UIKit 0x0000000101fac4a5 -[UIWindow makeKeyAndVisible] + 42
11 UIKit 0x0000000101f26396 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 4131
12 UIKit 0x0000000101f2c9c3 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1750
13 UIKit 0x0000000101f29ba3 -[UIApplication workspaceDidEndTransaction:] + 188
14 FrontBoardServices 0x00000001048d9784 -[FBSSerialQueue _performNext] + 192
15 FrontBoardServices 0x00000001048d9af2 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
16 CoreFoundation 0x0000000101aae011 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
17 CoreFoundation 0x0000000101aa3f3c __CFRunLoopDoSources0 + 556
18 CoreFoundation 0x0000000101aa33f3 __CFRunLoopRun + 867
19 CoreFoundation 0x0000000101aa2e08 CFRunLoopRunSpecific + 488
20 UIKit 0x0000000101f294f5 -[UIApplication _run] + 402
21 UIKit 0x0000000101f2e30d UIApplicationMain + 171
22 Login 0x00000001010fd33f main + 111
23 libdyld.dylib 0x00000001042a592d start + 1
24 ??? 0x0000000000000001 0x0 + 1
)
libc ++ abi.dylib:以NSException类型的未捕获异常终止
(lldb)bt
* thread#1:tid = 0x5fc0d,0x00000001045db286 libsystem_kernel.dylib __pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT
frame #0: 0x00000001045db286 libsystem_kernel.dylib
__ pthread_kill + 10
帧#1:0x00000001045a49f9 libsystem_pthread.dylib pthread_kill + 90
frame #2: 0x000000010434ca44 libsystem_c.dylib
abort + 129
第3帧:0x000000010414a051 libc ++ abi.dylib abort_message + 257
frame #4: 0x000000010416fac9 libc++abi.dylib
default_terminate_handler()+ 267
帧#5:0x00000001015fc046 libobjc.A.dylib _objc_terminate() + 103
frame #6: 0x000000010416d26e libc++abi.dylib
std :: __ terminate(void(*)())+ 8
第7帧:0x000000010416cef9 libc ++ abi.dylib __cxa_rethrow + 99
frame #8: 0x00000001015fbf5e libobjc.A.dylib
objc_exception_rethrow + 40
帧#9:0x0000000101aa2ec4 CoreFoundation CFRunLoopRunSpecific + 676
frame #10: 0x0000000101f294f5 UIKit
- [UIApplication _run] + 402
帧#11:0x0000000101f2e30d UIKit UIApplicationMain + 171
* frame #12: 0x00000001010fd33f Login
main(argc = 1,argv = 0x00007fff5eb02650)+ 111 at main.m:14
帧#13:0x00000001042a592d libdyld.dylib`start + 1
(lldb)
答案 0 :(得分:0)
以两种方式解决问题:
选项-1 强>
关于笔尖名称。检查笔尖名称拼写,它是否正确,区分大小写。
选项-2 强>
如果选项-1不起作用,请尝试此
然后工作正常