RubyMotion:操作无法完成。 (com.apple.InterfaceBuilder 错误 2001。)
Posted
技术标签:
【中文标题】RubyMotion:操作无法完成。 (com.apple.InterfaceBuilder 错误 2001。)【英文标题】:RubyMotion: The operation couldn’t be completed. (com.apple.InterfaceBuilder error 2001.) 【发布时间】:2016-03-14 13:48:13 【问题描述】:在我的应用程序的最新版本中,我开始在编译期间看到此错误消息,这只会带来
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】:我找到了解决办法:
问题是由不成功的 git 合并引起的,这意味着我的一个 nib 文件中有 <<<<<
。
我能够通过系统地逐个删除每个 nib 文件并尝试再次重建应用程序来找到它。
一旦我追踪到一个特定的 nib 文件,就很容易解决。
希望这个答案能帮助其他处于相同位置的人。
【讨论】:
以上是关于RubyMotion:操作无法完成。 (com.apple.InterfaceBuilder 错误 2001。)的主要内容,如果未能解决你的问题,请参考以下文章
UIScrollView 不使用 RubyMotion 滚动
如何在 RubyMotion 中使用 React Native