项目 ...xcodeproj 无法打开,因为它缺少 project.pbxproj 文件 [英] Project ...xcodeproj cannot be opened because it is missing its project.pbxproj file

查看:610
本文介绍了项目 ...xcodeproj 无法打开,因为它缺少 project.pbxproj 文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图合并分支,结果出现错误无法打开项目...无法打开,因为无法解析项目文件".然后我尝试听取其他 stackoverflow 响应的建议(即编辑文件以消除损坏),但无法编辑文件.看起来这实际上是一个目录,所以也许它的结构随着 xcode 4.4 版而改变,因为对 无法打开项目...无法打开,因为无法解析项目文件 已写入.

I was trying to merge branches and it resulted in the error "Unable to open project… cannot be opened because the project file cannot be parsed". I then tried to take the advice of other stackoverflow responses (namely to edit the file to remove the corruption), but was unable to edit the file. It appears that this is actually a directory, so maybe the structure of this changed with version 4.4 of xcode and since the response to Unable to open project... cannot be opened because the project file cannot be parsed was written.

然后我尝试从我的时间机器备份中恢复 myProject.xcodeproj.这不起作用,因为它说我无权访问 myProject.xcodeproj.我试图更改该目录的权限,但没有帮助.

I then tried to restore myProject.xcodeproj from my time machine backup. This does not work because it says that I don't have permission to access myProject.xcodeproj. I tried to change the permission of that directory, but that did not help.

我关闭并重新打开了 xcode.现在的错误是:

I closed and reopened xcode. Now the error is:

项目 ...xcodeproj 无法打开,因为它缺少 project.pbxproj 文件.

如何在 xcode 4.4 版中解决此问题?是否可以从 xcode 中的先前快照或存档或版本中恢复.可以用时光机恢复吗?我想避免重建整个项目.

How can I fix this problem in xcode version 4.4? Can it be restored from the previous snapshot or archive or version in xcode. Can it be restored with time machine. I would like to avoid rebuilding the entire project.

推荐答案

最后,我不得不做的是

'cp -R ...TimeMachineBackup/myProject.xcodeproj ...myProjectArea/myProject.xcodeproj'

然后我必须在 myProjectArea 中执行以下操作:

Then I had to do the following in myProjectArea:

git reset --merge

这允许我打开项目并将分支切换回我的主分支.

This allowed me to open the project and switch branches back to my main branch.

不是一个愉快的经历

这篇关于项目 ...xcodeproj 无法打开,因为它缺少 project.pbxproj 文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆