Xcode 8 上的 Interface Builder XIB 编译器错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/45752935/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 10:11:43  来源:igfitidea点击:

Interface Builder XIB compiler error on Xcode 8

iosobjective-cxcodexcode8xcode9

提问by Yagnesh Dobariya

After switching to Xcode 9 then back to Xcode 8, my build is failing and I'm getting this error. I'm not getting any error on Xcode 9 though.

切换到 Xcode 9 然后回到 Xcode 8 后,我的构建失败了,我收到了这个错误。不过,我在 Xcode 9 上没有收到任何错误。

Note: I've already checked :Solutionand Solution, however it's not working.

注意:我已经检查过:解决方案解决方案,但是它不起作用。

Why am I getting this error?

为什么我收到这个错误?

BasketTotalView.xib: Internal error. Please file a bug at bugreport.apple.com and attach "/var/folders/dg/_yf1yfd15svdj48mrrlws5vw0000gp/T/IB-agent-diagnostics_2017-08-18_10-08-35_271000".

BasketTotalView.xib:内部错误。请在 bugreport.apple.com 上提交错误并附上“/var/folders/dg/_yf1yfd15svdj48mrrlws5vw0000gp/T/IB-agent-diagnostics_2017-08-18_10-08-35_271000”。

回答by Yagnesh Dobariya

Click on your .XIB file 

From Right side bar select "Show the file Inspector"

Go to "Interface Builder Document" section.

In "Open In" dropdown select Xcode 8.

Clear derived data, Build and Run. 

May this help you.

回答by Jigar Tarsariya

I have solved this issue by following below steps:

我通过以下步骤解决了这个问题:

1. cmd + shift + k
2. cmd + option + shift + k
3. Restart Xcode
4. Restart your pc.

Hope this will also works for you. Thanks!

希望这也适用于您。谢谢!

回答by Abdullatif AlSharhan

In my case, the .xib file in the project wasn't linked correctly to a file in Finder, and it was dimmed a bit. After linking the file, it worked fine without any errors.

在我的例子中,项目中的 .xib 文件没有正确链接到 Finder 中的文件,它变暗了一点。链接文件后,它工作正常,没有任何错误。

The file can be linked by selecting it, and then from the file inspector, select the folder icon front the full path label, and locate the file.

可以通过选择文件来链接文件,然后从文件检查器中,选择完整路径标签前面的文件夹图标,然后定位文件。

回答by Eduardo Brandalise

In my case, none of the options above helped cause my problem wasn't in the DerivedData. I clicked on the arrow on the right side of the Interface Builder and it took me to a subfolder system inside /private/var/folders/

就我而言,上述选项都没有帮助导致我的问题不在 DerivedData 中。我点击了界面生成器右侧的箭头,它把我带到了/private/var/folders/内的一个子文件夹系统

This is the arrow that takes you to the file

这是带您到文件的箭头

I've cleaned it and rebooted the Mac. It worked! I followed this tutorial:

我已经清理了它并重新启动了 Mac。有效!我跟着这个教程:

Can I delete files or folders from /private/var/folders/?

我可以从 /private/var/folders/ 中删除文件或文件夹吗?

Some will say that just the reboot is enough to clean the folder but I've cleaned it anyway.

有人会说只要重新启动就足以清理文件夹,但我还是清理了它。