2011-05-14 41 views
0

我有一個名爲「FirstAid」的應用程序在模擬器和設備上崩潰。如果我創建一個名爲「FirstAid」的乾淨項目,該項目也會使用相同的報告進行崩潰。任何其他指定的應用程序都可以如何解決ios應用程序崩潰與某些名稱?

我已經做了一個乾淨的,並重建它,但它仍然崩潰。

我該如何解決?

 
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' 

回答

0

這個錯誤可能意味着幾件事情,但我敢打賭,你的一些網點(來自IB)已經壞了。檢查你的XIB文件+他們的所有網點,並確保它們存在於你的代碼中。

+0

特別是,檢查您的主窗口的自定義類。如果您更改了應用程序名稱,那麼該類的名稱也可能已更改。所以你的XIB文件可能仍然引用舊類。 – Codo 2011-05-14 10:27:13

+0

我將所有文件複製到不同的位置,並使用不同的名稱創建了一個新項目,並且工作正常。我刪除了該項目。用相同的名稱創建了一個新的(ViewBased),點擊運行,失敗並出現上述錯誤。所以我認爲這與XCode在某處留下某些文件有關。 – 2011-05-14 11:01:38