XCode 工作区完整性错误

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31360125/
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 07:27:34  来源:igfitidea点击:

XCode Workspace Integrity Error

iosxcodegit

提问by Kutay Demireren

I was commiting and pushing to git. While doing that, I got error "Workspace Integrity". I thought, that error is because I have some unmerged files, then I found out I really had unmerged files. So, finally I merged, fixed and could push to Visual Studio Online, which is my host. Then after that I tried again, but the error was the same. So, I gave it try to downloading from Visual Studio and open that downloaded project. I thought, it will not give me error. Unfortunately, as you may assume too, that didn't work.

我正在承诺并推动 git。这样做时,我收到错误“工作区完整性”。我想,那个错误是因为我有一些未合并的文件,然后我发现我真的有未合并的文件。所以,最后我合并、修复并可以推送到 Visual Studio Online,这是我的主机。然后我又试了一次,但错误是一样的。所以,我尝试从 Visual Studio 下载并打开下载的项目。我想,它不会给我错误。不幸的是,正如您可能也假设的那样,这不起作用。

I have to fix it, but I don't have any idea what it is. There is no such a solution for that error, which is really strange. It is the same error that was asked on stackoverflow in this linkand this linkbefore; both don't have solution.

我必须修复它,但我不知道它是什么。那个错误没有这样的解决方案,真是奇怪。这是在此链接此链接之前在 stackoverflow 上询问的相同错误;两者都没有解决方案。

I really need all of you extremely, that error is a bit scary.

我真的非常需要你们所有人,那个错误有点可怕。

Waiting for your guidance.

等待您的指导。

采纳答案by Dare2dream

What I usually do is open the file in version editor and see what has changed. Version editor option

我通常做的是在版本编辑器中打开文件,看看有什么变化。 版本编辑器选项

回答by Benjamin Beaumont

I found this similar issue and it turned out to be a merge conflict that had snuck into our git repo:

我发现了这个类似的问题,结果证明是一个潜入我们 git repo 的合并冲突:

enter image description here

在此处输入图片说明

I found it by searching in my project for <<<<< HEADwhich revealed a merge error waiting to be resolved in project.pbxproj

我通过在我的项目中搜索发现了它,<<<<< HEAD其中显示了一个等待解决的合并错误project.pbxproj

Hopefully that helps other people who end up on this stack overflow post.

希望这可以帮助其他最终出现在此堆栈溢出帖子中的人。

回答by Fernando Martínez

Usually it happens when XCode mess up with your reference files.

通常,当 XCode 弄乱您的参考文件时会发生这种情况。

Try to do a find (not on XCode, Atom you can inspect better) for "lastKnownFileType" and look if the references for this one are correct.

尝试为“ lastKnownFileType”查找(不是在 XCode,Atom 上您可以更好地检查)并查看此引用是否正确。

I've changed the place of few modules in the workspace, and it moved, it compiles, but cannot index due to "XCode Workspace Integrity Error ".

我改变了工作区中几个模块的位置,它移动了,它编译了,但由于“XCode 工作区完整性错误”而无法索引。

I've fixed by inspecting all path references and they all was related to wrong path in lastKnownFileType

我通过检查所有路径引用进行了修复,它们都与错误的路径有关 lastKnownFileType