2017-10-05 47 views
2

我在这个错误上的Xcode项目,这是去年在Xcode 8中建立,现在我我试图在Xcode 9 GM中打开它。Xcode 9 Main.storyboard错误,当建设应用程序“内部错误。请在bugreport.apple.com上提交一个错误,并附上”

对双重检查编辑,我注意到它没有使用通用汽车,我使用Xcode 9.1测试版2.下面的解决方案的工作!

错误:使用Command + Shift + K

  • 使用Command + Option键删除构建导出数据文件夹

    1. 清洁工程:

      /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". 
      

      我试图从其他类似职位的建议+ Shift + l

    2. 退出Xcode并重新打开它
    3. 也重新启动的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}' 
    
  • 回答

    4

    从Xcode的9.1 Beta 2版本说明:

    Interface Builder

    A UITabBarItem configured as a system item in a storyboard or xib causes a build failure. (34197132)

    Workaround: Configure as a custom item in Interface Builder, then reset the tab bar item to the desired system item in the awakeFromNib method of the view controller.

    我有同样的问题,你有这似乎是原因,因为日志指着我UITabBarItems之一。

    编辑:我可以证实它的作品。将所有系统TabBarItems更改为自定义,并将其编译! 编辑2:你确定你没有使用9.1测试版吗?因为我在今天之前从未遇到过这个问题,当时我测试了Xcode 9.1 beta 2(在之前使用Xcode 9之后)。

    +0

    你是对的!我在机器上安装了Xcode的GM和beta版本,然后再次检查并注意到我实际上只是在使用Beta版本时遇到问题。解决方案解决方案非常完美!谢谢! –

    +0

    你是什么意思定制?我已经为这些标签栏项目创建了“UITabBarItem”的自定义子类,但我仍然收到错误消息。 – micnguyen

    +3

    @micnguyen自定义我的意思是'UITabBarItem',它的外观在Interface Builder的属性窗格中设置为自定义,而不是系统提供的搜索或下载。你必须显然在IB中做这个改变。 –

    0

    清除DerivedData文件夹(在〜/ Library/Developer/Xcode/DerivedData中)是解决了我的问题。

    +0

    正如我原来的帖子所述,我已经这样做了。 –

    0

    这是位直观的,但完全重新启动只有帮助。没有干净的,删除派生的数据或新的故事板帮助