Xcode 不会打开我的项目
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7290377/
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 will not open my project
提问by Tono Nam
I where working with a project and I closed because my computer was geting slow. When I tried to open my solution again xcode quitted. So everytime I try to open my project I get this error:
我在处理一个项目时关闭了,因为我的电脑变慢了。当我再次尝试打开我的解决方案时,xcode 退出了。因此,每次我尝试打开我的项目时,都会收到此错误:


I am not able to open my solution. IS THERE A WAY I CAN RECOVER MY PROJECT!?
我无法打开我的解决方案。有没有办法恢复我的项目!?
回答by Rudolf Adamkovi?
Nothing mentioned above/below worked for me. So, here's what I did instead.
上面/下面提到的没有对我有用。所以,这就是我所做的。
Right click on the .xcodeprojfile and select Show Package Contents. Then delete project.xcworkspacefile. Open the project in Xcode and viola! Hope this helps somebody.
右键单击该.xcodeproj文件并选择Show Package Contents。然后删除project.xcworkspace文件。在 Xcode 和 viola 中打开项目!希望这可以帮助某人。
回答by Nathan Day
There are a couple of things you can try, first make sure Xcode is not running ,trash the ~/Library/Cache/ folder contents, and trash the contents of the ~/Library/Developer/Xcode/DerivedData/ folder, if you what to can just find the stuff for your project in ~/Library/Developer/Xcode/DerivedData/ and trash just that. Then restart your computer.
有几件事你可以尝试,首先确保 Xcode 没有运行,删除 ~/Library/Cache/ 文件夹的内容,然后删除 ~/Library/Developer/Xcode/DerivedData/ 文件夹的内容,如果你什么可以在 ~/Library/Developer/Xcode/DerivedData/ 中找到适合您项目的内容,然后将其丢弃。然后重新启动计算机。
If that doesn't work, rename your faulty projects folder to so method like ' old', create a new project of the same name, and then move all of the source files from ' old' to you new project and add them. Its a bit painful I known but I have had to do this once to get a project working again.
如果这不起作用,请将您的错误项目文件夹重命名为“旧”之类的方法,创建一个同名的新项目,然后将所有源文件从“旧”移动到您的新项目并添加它们。我知道这有点痛苦,但我不得不这样做一次才能让项目再次工作。
回答by Allan Macatingrao
If you're working with git, right click the project-name.xcodeproj > Show Package Contents, open the file project.pbxprojand check for conflict and resolve it.
如果您正在使用 git,请右键单击project-name.xcodeproj > Show Package Contents,打开文件project.pbxproj并检查冲突并解决它。
回答by Tulleb
In my case, the project was moved to my iCloud Drive without me noticing it.
就我而言,该项目在我没有注意到的情况下被转移到了我的 iCloud Drive。
If it happens to you too, just go to your Finder, locate the project and check if there is a cloud next to it. Just right click it and "Download now". Try again once the download is finished.
如果您也遇到这种情况,只需转到您的 Finder,找到该项目并检查它旁边是否有云。只需右键单击它并“立即下载”。下载完成后重试。

