0

我的应用程序有问题。它在我的 iPhone 3GS 上运行良好,但现在我尝试在 iPhone 4 上对其进行测试时,它在闪屏可见时崩溃了。

这是日志:

2011-07-06 16:01:05.611 Apptest [294:607] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not load NIB in bundle: 'NSBundle </var/mobile/Applications/0C371068-7E74-4C54-997C-80E3B0929411/Apptest.app> (loaded)' with name 'MainWindow''
*** Call stack at first throw:
(
    0   CoreFoundation                      0x311ec64f __exceptionPreprocess + 114
    1   libobjc.A.dylib                     0x3494dc5d objc_exception_throw + 24
    2   CoreFoundation                      0x311ec491 +[NSException raise:format:arguments:] + 68
    3   CoreFoundation                      0x311ec4cb +[NSException raise:format:] + 34
    4   UIKit                               0x368c9a53 -[UINib instantiateWithOwner:options:] + 1110
    5   UIKit                               0x368cae09 -[NSBundle(UINSBundleAdditions) loadNibNamed:owner:options:] + 92
    6   UIKit                               0x366f54cd -[UIApplication _loadMainNibFile] + 96
    7   UIKit                               0x366efb09 -[UIApplication _runWithURL:payload:launchOrientation:statusBarStyle:statusBarHidden:] + 180
    8   UIKit                               0x366c47d7 -[UIApplication handleEvent:withNewEvent:] + 1114
    9   UIKit                               0x366c4215 -[UIApplication sendEvent:] + 44
    10  UIKit                               0x366c3c53 _UIApplicationHandleEvent + 5090
    11  GraphicsServices                    0x36398e77 PurpleEventCallback + 666
    12  CoreFoundation                      0x311c3a97 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 26
    13  CoreFoundation                      0x311c583f __CFRunLoopDoSource1 + 166
    14  CoreFoundation                      0x311c660d __CFRunLoopRun + 520
    15  CoreFoundation                      0x31156ec3 CFRunLoopRunSpecific + 230
    16  CoreFoundation                      0x31156dcb CFRunLoopRunInMode + 58
    17  UIKit                               0x366eed49 -[UIApplication _run] + 372
    18  UIKit                               0x366ec807 UIApplicationMain + 670
    19  Apptest                             0x00002a0b main + 82
    20  Apptest                             0x000029b4 start + 40
)
terminate called after throwing an instance of 'NSException'

我希望你能帮助我。提前致谢。

4

1 回答 1

0

你的MainWindow.xib项目中真的存在吗?

您可能不小心删除了它。即使您从项目中删除它,它仍然可以在 3GS 上工作,因为它很可能仍然在 3GS 的捆绑包中。

如果我遇到这样的不一致,我通常会清理我的项目并从我的设备中重置模拟器/卸载应用程序。

于 2011-07-06T14:16:04.900 回答