Xcode 4.2:编译错误(命令/Developer/usr/bin/ibtool失败,退出代码255)

Xcode 4.2:编译错误(命令/Developer/usr/bin/ibtool失败,退出代码255),xcode,compiler-errors,xib,Xcode,Compiler Errors,Xib,在我的MacBook Air上的fresh 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 PA

在我的MacBook Air上的fresh 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时出现内部错误,选择:崩溃并继续

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元素,或者从头开始更改以前导致问题的内容

忘了告诉别人:我使用相同的部署目标在iPhone 5.0模拟器上运行确保xib的源代码包含本节列出的所有必要文件。