Xcode 4.2:编译错误(Command /Developer/usr/bin/ibtool failed with



在MacBook Air的OS X Lion上安装了Xcode 4.2,无法编译我的旧项目。创建新的单窗口项目(基于视图的应用程序)-不做任何更改,只是尝试编译它,得到错误:

CompileXIB Test3/en.lproj/ViewController.xib
    cd /Volumes/MacExt/Projects/iOS/Test3
    setenv IBC_MINIMUM_COMPATIBILITY_VERSION 5.0
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    setenv XCODE_DEVELOPER_USR_PATH /Developer/usr/bin/..
    /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text --compile /Users/lial/Library/Developer/Xcode/DerivedData/Test3-fvcbdbtitujnwabzsgjgcbugfmoy/Build/Products/Debug-iphonesimulator/Test3.app/en.lproj/ViewController.nib /Volumes/MacExt/Projects/iOS/Test3/Test3/en.lproj/ViewController.xib
--sdk /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk
Command /Developer/usr/bin/ibtool failed with exit code 255

尝试打开xib时出现内部错误选择:Crash and Continue

Xcode encountered an internal logic error. Choose "Continue" to continue running Xcode in an inconsistent state.  Choose "Crash" to halt Xcode and file a bug with Crash Reporter. Choosing "Crash" will result in the loss of all unsaved data.

请帮帮我,我该如何解决这个问题?Xcode不稳定吗?还是我的一些项目设置不正确?

我刚刚经历了同样的事情。由于git合并,它在故事板中变成了一个重复的UILabel。显然,如果两个UI元素具有相同的内部ID, Xcode将崩溃。

我找到责任问题的方法是:

  • 迭代地回退到git历史中,检查每个提交,直到你找到第一个不会导致Xcode崩溃的故事板。
  • 一旦你有了开始崩溃的提交,检查HEAD并迭代地恢复问题提交中的故事板更改。继续缩小它,直到你有一个UI元素或一行会导致崩溃。
  • 永久恢复负责任的更改并重新启动Xcode。再次打开故事板,您可能会收到关于内部不一致的警告。同意Xcode所做的修改,但要审查。
  • 如果有必要,你现在可以尝试重新创建UI元素或从头开始更改之前导致问题的内容。

相关内容

最新更新