ios Xcode 故事板:内部错误。请提交错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/33373683/
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
Xcode storyboard: Internal error. Please file a bug
提问by Justin Leo
While editing in the storyboard, specifically assigning a view controller to a specific class, I suddenly encountered this error when I wanted to run the project.
在storyboard中编辑的时候,专门给一个特定的类分配了一个view controller,想跑项目的时候突然遇到这个错误。
Main.storyboard: Internal error. Please file a bug at bugreport.apple.com and attach "/var/folders/79/_jh611t15qsfcx165_jv_20h0000gn/T/IB-agent-diagnostics_2015-10-28_00-33-12_730000".
Main.storyboard:内部错误。请在 bugreport.apple.com 上提交错误并附上“/var/folders/79/_jh611t15qsfcx165_jv_20h0000gn/T/IB-agent-diagnostics_2015-10-28_00-33-12_730000”。
And now I can't run my project anymore. I couldn't find any information regarding to this anywhere else. Did anyone encounter this before?
现在我不能再运行我的项目了。我在其他任何地方都找不到与此相关的任何信息。有没有人遇到过这种情况?
回答by Fahad Ajmal
I faced the same issue. And it was solved by cleaning up the build files.
我遇到了同样的问题。并通过清理构建文件解决了这个问题。
cmd + shift + k
cmd + shift + k
AND
和
cmd + option + shift + k
cmd + 选项 + shift + k
Hope this helps Thanks.
希望这有助于谢谢。
回答by Syed Zahid Shah
The following steps will stop your problem.
以下步骤将解决您的问题。
- cmd + shift + k
- cmd + option + shift + k
- Restart Xcode
- Restart Mac.
- cmd + shift + k
- cmd + 选项 + shift + k
- 重启Xcode
- 重新启动 Mac。
回答by Charlton Provatas
Clearing out the DerivedData folder (in ~/Library/Developer/Xcode/DerivedData) is what fixed the issue for me.
清除 DerivedData 文件夹(在 ~/Library/Developer/Xcode/DerivedData 中)为我解决了这个问题。
回答by Jayprakash Dubey
I had the same issue. Got it fixed using below steps :
我遇到过同样的问题。使用以下步骤修复它:
Delete the derived dataof your project
Clean your project(Shortcut :
cmd + shift + k
)
- Now, run your app.
- 现在,运行您的应用程序。
回答by Dan Rosenstark
Just ran into this error, and it coincided with non-available iOS versions showing for the wrong Xcode (e.g., iOS 11.2 showing for Xcode 8.2.1, which is not possible for iOS Simulators).
刚刚遇到这个错误,它与不可用的 iOS 版本显示为错误的 Xcode(例如,iOS 11.2 显示为 Xcode 8.2.1,这对于 iOS 模拟器是不可能的)。
Solution was to delete /Library/Developer/CoreSimulator
, e.g.,
解决方案是删除/Library/Developer/CoreSimulator
,例如,
rm -rf /Library/Developer/CoreSimulator
In theoryyou should be able to run xcrun simctl delete unavailable
but that didn't work in this case.
从理论上讲,您应该能够运行,xcrun simctl delete unavailable
但在这种情况下不起作用。
NoteFound this issue on Xcode 8.2.1, but 9.2 was also installed.
注意在 Xcode 8.2.1 上发现此问题,但也安装了 9.2。
回答by Elsammak
I simply removed the file causing this issue (just reference not delete) and re-added it again.
我只是删除了导致此问题的文件(只是引用而不是删除)并再次重新添加。
回答by blahartinger
Sounds like you found a bug in Xcode and should file a bug report with apple hereand attach the file that it specifies with the error. In the mean time, do you have an earlier version of your project that you can revert back to? Or provide the xml of your main story board here?
听起来您在 Xcode 中发现了一个错误,应该在此处向苹果提交错误报告,并附上它指定的错误文件。同时,您是否有可以恢复到的项目的早期版本?或者在这里提供您的主要故事板的xml?
回答by skram
In my case, the problem was with a UITextField as a subview in a UITableViewCellwith 'Basic'styling. Once I changed it from 'Basic' to 'Custom'It started compiling.
就我而言,问题在于 UITextField 作为具有“基本”样式的UITableViewCell 中的子视图。一旦我将它从“基本”更改为“自定义”,它就开始编译。
回答by Shalini
Here are the steps to fix this issue:
以下是解决此问题的步骤:
Uncheck target for the xib file -> clean the project->then check the target->clean the project-> run/build the project. Working in xcode 8.x
取消选中 xib 文件的目标 -> 清理项目 -> 然后检查目标 -> 清理项目 -> 运行/构建项目。在 xcode 8.x 中工作
回答by Floris Snuif
All these solutions didn't work for me.
What did work was this:
所有这些解决方案对我都不起作用。
什么工作是这样的:
$ sudo chmod -R 777 ~/Library/Logs