gpt4 book ai didi

ios - 无法设置 (keyPath) 用户定义的此类上的检查属性对于键 keyPath 不符合键值编码

转载 作者:行者123 更新时间:2023-11-28 08:46:20 26 4
gpt4 key购买 nike

我的 swift 应用程序在运行时失败。我该如何解决这个问题?

我已经检查过,avgTime_text 定义明确。

我不知道如何读取 xcode 中的堆栈跟踪,有人可以提供一些指导吗?

2016-02-06 15:16:07.298 Inline[39053:200479] Unknown class _TtC6Inline24InlineMainViewController in Interface Builder file.
2016-02-06 15:16:15.414 Inline[39053:] <GMR/INFO> App measurement v.1302000 started
2016-02-06 15:16:15.414 Inline[39053:] <GMR/INFO> To enable debug logging set the following application argument: -GMRDebugEnabled (see http://goo.gl/Y0Yjwu)
2016-02-06 15:16:15.466 Inline[39053:200479] Unknown class _TtC6Inline24InlineMainViewController in Interface Builder file.
2016-02-06 15:16:15.524 Inline[39053:200479] Unknown class logo in Interface Builder file.
2016-02-06 15:16:15.538 Inline[39053:200479] Failed to set (keyPath) user defined inspected property on (UIView): [<UIView 0x7fa3590a47d0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key keyPath.
2016-02-06 15:16:15.538 Inline[39053:200479] Failed to set (keyPath) user defined inspected property on (UIView): [<UIView 0x7fa3590c9c70> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key keyPath.
2016-02-06 15:16:15.538 Inline[39053:200479] Failed to set (keyPath) user defined inspected property on (UIView): [<UIView 0x7fa35846ccf0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key keyPath.
2016-02-06 15:16:15.542 Inline[39053:200479] WARNING: GoogleAnalytics 3.14 void GAIUncaughtExceptionHandler(NSException *) (GAIUncaughtExceptionHandler.m:48): Uncaught exception: [<UIViewController 0x7fa3590c4cd0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key avgTime_text.
2016-02-06 15:16:15.672 Inline[39053:] <GMR/INFO> App measurement enabled
2016-02-06 15:16:20.548 Inline[39053:200479] *** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UIViewController 0x7fa3590c4cd0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key avgTime_text.'
*** First throw call stack:
(
0 CoreFoundation 0x000000010ab10e65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010bfd3deb objc_exception_throw + 48
2 CoreFoundation 0x000000010ab10aa9 -[NSException raise] + 9
3 Foundation 0x000000010bba09bb -[NSObject(NSKeyValueCoding) setValue:forKey:] + 288
4 UIKit 0x000000010cb15320 -[UIViewController setValue:forKey:] + 88
5 UIKit 0x000000010cd43f41 -[UIRuntimeOutletConnection connect] + 109
6 CoreFoundation 0x000000010aa514a0 -[NSArray makeObjectsPerformSelector:] + 224
7 UIKit 0x000000010cd42924 -[UINib instantiateWithOwner:options:] + 1864
8 UIKit 0x000000010cb1beea -[UIViewController _loadViewFromNibNamed:bundle:] + 381
9 UIKit 0x000000010cb1c816 -[UIViewController loadView] + 178
10 UIKit 0x000000010cb1cb74 -[UIViewController loadViewIfRequired] + 138
11 UIKit 0x000000010cb1d2e7 -[UIViewController view] + 27
12 UIKit 0x000000010c9f3ab0 -[UIWindow addRootViewControllerViewIfPossible] + 61
13 UIKit 0x000000010c9f4199 -[UIWindow _setHidden:forced:] + 282
14 UIKit 0x000000010ca05c2e -[UIWindow makeKeyAndVisible] + 42
15 Inline 0x00000001097984f7 _TFC6Inline11AppDelegate16launchStoryboardfS0_FOS_10StoryboardT_ + 1127
16 Inline 0x0000000109798048 _TFC6Inline11AppDelegate25chooseAndLuanchStoryboardfS0_FT_T_ + 248
17 Inline 0x00000001097985a9 _TFC6Inline11AppDelegate11applicationfS0_FTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVSs10DictionaryCSo8NSObjectPSs9AnyObject____Sb + 105
18 Inline 0x00000001097986e3 _TToFC6Inline11AppDelegate11applicationfS0_FTCSo13UIApplication29didFinishLaunchingWithOptionsGSqGVSs10DictionaryCSo8NSObjectPSs9AnyObject____Sb + 179
19 UIKit 0x000000010c97d1f1 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 272
20 UIKit 0x000000010c97e397 -[UIApplication _callInitializationDelegatesForMainScene:transitionContext:] + 3415
21 UIKit 0x000000010c984cc6 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1760
22 UIKit 0x000000010c981e7b -[UIApplication workspaceDidEndTransaction:] + 188
23 FrontBoardServices 0x000000011019d754 -[FBSSerialQueue _performNext] + 192
24 FrontBoardServices 0x000000011019dac2 -[FBSSerialQueue _performNextFromRunLoopSource] + 45
25 CoreFoundation 0x000000010aa3ca31 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
26 CoreFoundation 0x000000010aa3295c __CFRunLoopDoSources0 + 556
27 CoreFoundation 0x000000010aa31e13 __CFRunLoopRun + 867
28 CoreFoundation 0x000000010aa31828 CFRunLoopRunSpecific + 488
29 UIKit 0x000000010c9817cd -[UIApplication _run] + 402
30 UIKit 0x000000010c986610 UIApplicationMain + 171
31 Inline 0x00000001097998dd main + 109
32 libdyld.dylib 0x000000010e5b792d start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

这是代码失败的地方:AppDeligate 下的 window?.makeKeyAndVisible()

func launchStoryboard(storyboard: Storyboard) {
window = UIWindow(frame: UIScreen.mainScreen().bounds)
UIApplication.sharedApplication().setStatusBarHidden(true, withAnimation: .Slide)
let storyboard = UIStoryboard(name: storyboard.rawValue, bundle: nil)
let controller = storyboard.instantiateInitialViewController()!
if (controller is InlineMainViewController ){
mainViewController = controller as! InlineMainViewController
}
window?.rootViewController = controller
window?.makeKeyAndVisible()
}

最佳答案

虽然这是一篇旧文章,但请在 Xcode 中查看用户定义的运行时属性。您可能在那里声明了一个默认属性,删除它应该可以解决您的问题。

关于ios - 无法设置 (keyPath) 用户定义的此类上的检查属性对于键 keyPath 不符合键值编码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35241514/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com