【发布时间】:2017-10-05 01:36:46
【问题描述】:
我在去年在 Xcode 8 中构建的 Xcode 项目中遇到此错误,现在我正尝试在 Xcode 9 GM 中打开它。
在仔细检查时编辑,我注意到它没有使用 GM,我使用的是 Xcode 9.1 beta 2。下面的解决方案有效!
错误:
/Users/XXXX/Documents/App Development/Final Apps/XXXX/Base.lproj/Main.storyboard: Internal error. Please file a bug at bugreport.apple.com and attach "/var/folders/ln/n28_nbyn2cg9_5dfqfsj8_7w0000gn/T/IB-agent-diagnostics_2017-10-04_21-24-39_279000".
我已经尝试过其他类似帖子的建议:
- 使用 Command + Shift + k 清理项目
- 使用 Command + Option + Shift + l 删除构建派生数据文件夹
- 退出 Xcode 并重新打开它
- Mac 也重启了
如果我转到错误消息指向的文件夹,我看到的内容为:
CoreSimulatorLogs Document.storyboard Log.txt system.log
在 Log.txt 中,我看到了这个:
Failed to compile nib consisting of IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBProxyObject, IBUIBarButtonItem, IBUIBarButtonItem, IBUIBarButtonItem, IBUIBarButtonItem, IBUIBarButtonItem, IBUIBarButtonItem, IBUICollectionViewController, IBUINavigationBar, IBUINavigationBar, IBUINavigationBar, IBUINavigationBar, IBUINavigationBar, IBUINavigationController, IBUINavigationController, IBUINavigationController, IBUINavigationController, IBUINavigationController, IBUINavigationItem, IBUINavigationItem, IBUINavigationItem, IBUINavigationItem, IBUINavigationItem, IBUIStoryboardEmbedSegueTemplate, IBUIStoryboardEmbedSegueTemplate, IBUIStoryboardShowSegueTemplate, IBUITabBar, IBUITabBarController, IBUITabBarItem, IBUITabBarItem, IBUITabBarItem, IBUITabBarItem, IBUITabBarItem, IBUITableViewController, IBUIViewController, IBUIViewController, and IBUIViewController.
Exception name: NSInvalidArgumentException
Exception reason: System-provided UIImage instances cannot be encoded in NIBs - raised for instance '<UIImage: 0x7f945db51a90>, {18, 20}'
Exception backtrace:
0. CoreFoundation 0x000000010800d023 __exceptionPreprocess
1. libobjc.A.dylib 0x0000000106de3f41 objc_exception_throw
2. IBCocoaTouchToolFoundation 0x0000000103071a8a -[IBCocoaTouchToolNibFactory nibCoder:willEncodeObject:]
3. IBCocoaTouchToolFoundation 0x0000000103071b77 -[IBCocoaTouchToolNibFactory nibCoder:willEncodeObject:forObject:forKey:]
4. UIKit 0x00000001038111f5 -[UINibEncoder replacementObjectForObject:forKey:]
5. UIKit 0x0000000103811d4d -[UINibEncoder encodeObject:forKey:]
6. UIKit 0x0000000103a4a6de -[UITabBarItem encodeWithCoder:]
7. UIKit 0x0000000103811ea0 -[UINibEncoder encodeObject:forKey:]
8. IBCocoaTouchToolFoundation 0x000000010305ed41 -[UIViewControllerTemplate encodeWithCoder:]
9. IBCocoaTouchToolFoundation 0x0000000103055018 -[UINavigationControllerTemplate encodeWithCoder:]
10. UIKit 0x0000000103811ea0 -[UINibEncoder encodeObject:forKey:]
11. UIKit 0x0000000103811354 -[UINibEncoder serializeArray:]
12. UIKit 0x0000000103811ea0 -[UINibEncoder encodeObject:forKey:]
13. IBCocoaTouchToolFoundation 0x000000010305ef3c -[UIViewControllerTemplate encodeWithCoder:]
14. IBCocoaTouchToolFoundation 0x00000001030704d9 -[UITabBarControllerTemplate encodeWithCoder:]
15. IBCocoaTouchToolFoundation 0x0000000103071e57 -[UIClassSwapper(IBHooksFor6767205) designTimeEncodeWithCoder:]
16. UIKit 0x0000000103811ea0 -[UINibEncoder encodeObject:forKey:]
17. UIKit 0x0000000103811354 -[UINibEncoder serializeArray:]
18. UIKit 0x0000000103811ea0 -[UINibEncoder encodeObject:forKey:]
19. IBCocoaTouchToolFoundation 0x000000010307166c -[IBCocoaTouchToolNibFactory encodeNibContentWithCoder:]
20. IBCocoaTouchToolFoundation 0x0000000103071801 -[IBCocoaTouchToolNibFactory nibDataWithMinimumCompatibility:]
21. IBCocoaTouchToolFoundation 0x0000000103071d43 +[IBCocoaTouchToolNibFactory nibDataFromObjects:customClasses:topLevelObjects:traitStorageLists:accessibilityConfigurations:connections:keyValuePairs:visibleWindows:minimumCompatibility:]
22. IBCocoaTouchToolFoundation 0x00000001030379d5 -[IBCocoaTouchTool compileNibForRequest:minimumCompatibility:layoutInfo:imagesToImageNames:]
23. IBFoundation 0x000000010640009b __80-[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:]_block_invoke
24. IBFoundation 0x00000001063ffe98 -[IBMessageReceiveChannel deliverMessage:toTarget:withArguments:context:result:]
25. IBFoundation 0x00000001063ff80a __88-[IBMessageReceiveChannel runBlockingReceiveLoopNotifyingQueue:notifyingTarget:context:]_block_invoke
26. libdispatch.dylib 0x000000010cf352b5 _dispatch_client_callout
27. libdispatch.dylib 0x000000010cf40999 _dispatch_sync_thread_bound_invoke
28. libdispatch.dylib 0x000000010cf352b5 _dispatch_client_callout
29. libdispatch.dylib 0x000000010cf3f496 _dispatch_main_queue_callback_4CF
30. CoreFoundation 0x0000000107fcfd79 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__
31. CoreFoundation 0x0000000107f94422 __CFRunLoopRun
32. CoreFoundation 0x0000000107f93849 CFRunLoopRunSpecific
33. Foundation 0x00000001067dfe5e -[NSRunLoop(NSRunLoop) runMode:beforeDate:]
34. IBFoundation 0x00000001063c1cf5 -[IBAbstractPlatformTool startServingReceiveChannel:]
35. IBFoundation 0x00000001063c1fb0 -[IBAbstractPlatformTool startServingWriteDescriptor:readDescriptor:]
36. IBFoundation 0x00000001063c2ac9 +[IBAbstractPlatformTool main]
37. ??? 0x0000000102f9aba7 ???
38. libdyld.dylib 0x000000010cfa9d81 start
Exception info:{
}
我不知道如何继续。有什么建议吗?
这个错误是什么意思?
System-provided UIImage instances cannot be encoded in NIBs - raised for instance '<UIImage: 0x7f945db51a90>, {18, 20}'
【问题讨论】:
标签: ios xcode uiimage ios11 xcode9