RubyMotion:操作无法完成。 (com.apple.InterfaceBuilder错误2001.)

时间:2016-03-14 13:48:14

标签: interface-builder xib nib rubymotion

在我的应用程序的最新版本中,我开始在编译期间看到此错误消息,这只会带来

Run `bundle install` to install missing gems.
     Build ./build/iPhoneSimulator-8.0-Development
     Build vendor/AKETooltip
      Link ./build/iPhoneSimulator-8.0-Development/MyApp.app/MyApp
   Compile ./resources/nibs/MyCell.xib
   Compile ./resources/nibs/MyCell2.xib
   Compile ./resources/nibs/MyCell3.xib
   Compile ./resources/nibs/MyCell4.xib
   Compile ./resources/nibs/MyCell5.xib
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>com.apple.ibtool.errors</key>
    <array>
        <dict>
            <key>description</key>
            <string>The operation couldn’t be completed. (com.apple.InterfaceBuilder error 2001.)</string>
        </dict>
    </array>
</dict>
</plist>
rake aborted!
Command failed with status (1): ['/Applications/Xcode.app/Contents/Develope...]
/Library/RubyMotion/lib/motion/project/builder.rb:402:in `block (2 levels) in build'
/Library/RubyMotion/lib/motion/project/builder.rb:399:in `each'
/Library/RubyMotion/lib/motion/project/builder.rb:399:in `block in build'
/Library/RubyMotion/lib/motion/project/builder.rb:394:in `each'
/Library/RubyMotion/lib/motion/project/builder.rb:394:in `build'
/Library/RubyMotion/lib/motion/project/app.rb:78:in `build'
/Users/Gavin/.rvm/gems/ruby-2.2.3/gems/motion-cocoapods-1.7.8/lib/motion/project/cocoapods.rb:53:in `build_with_cocoapods'
/Library/RubyMotion/lib/motion/project/template/ios.rb:68:in `block (2 levels) in <top (required)>'
/Library/RubyMotion/lib/motion/project/template/ios.rb:186:in `block in <top (required)>'
/Users/Gavin/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
/Users/Gavin/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => build:simulator
(See full trace by running task with --trace)

1 个答案:

答案 0 :(得分:0)

我找到了解决方法:

问题是由于git合并失败导致的,这意味着我的一个nib文件中有<<<<<

我能够通过系统地逐个删除每个nib文件并尝试再次重建应用程序来找到它。

一旦我将其跟踪到一个特定的nib文件,就很容易解决。

希望这个答案可以帮助处于相同位置的其他人。