无法打开项目...无法打开,因为无法分析项目文件 [英] Unable to open project... cannot be opened because the project file cannot be parsed

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

问题描述

我已经工作了一段时间来创建一个iPhone应用程序.今天,当电池电量不足时,我一直在工作并不断保存源文件,然后电源就熄灭了.

现在,当我重新插入计算机电源并获得良好电源时,我尝试打开我的项目文件,但出现错误:

无法打开项目

无法打开项目...,因为无法分析项目文件.

人们是否有办法让我从中恢复过来?我尝试使用较旧的项目文件,然后重新插入然后进行编译.它给了我一个时髦的错误,可能是因为它没有找到它想要的所有文件...

如果可能的话,我真的不想从头开始重建项目.


编辑

好吧,我在此文件和稍旧的项目文件之间进行了区分,该文件工作正常,并发现文件中存在一些损坏.合并它们(最新和最好的部分)后,它现在可以工作了.

关于SVN的要点.我有一个,但是尝试将XCode与它同步有些时髦.我现在肯定会花更多的时间...;-)

解决方案

我遇到了这个问题,我的上级告诉我一个解决方案,即:

右键单击您的projectname.xcodeproj文件,此处projectname将是您的项目的名称.现在,右键单击后选择显示软件包内容.之后,在文本编辑器中打开projectname.pbxproj文件.现在搜索包含<<<<<<< .mine=======>>>>>>> .r的行.例如,在我的情况下,它看起来像这样

<<<<<<< .mine
    9ADAAC6A15DCEF6A0019ACA8 .... in Resources */,
=======
    52FD7F3D15DCEAEF009E9322 ... in Resources */,
>>>>>>> .r269

现在删除那些<<<<<<< .mine=======>>>>>>> .r行,使它看起来像这样

    9ADAAC6A15DCEF6A0019ACA8 /* BuyPriceBtn.png in Resources */,

    52FD7F3D15DCEAEF009E9322 /* discussionForm.zip in Resources */,

现在保存并打开Xcode项目并进行构建.一切都会好起来的.

I have been working for a while to create an iPhone app. Today when my battery was low, I was working and constantly saving my source files then the power went out...

Now when I plugged my computer back in and it is getting good power I try to open my project file and I get an error:

Unable to Open Project

Project ... cannot be opened because the project file cannot be parsed.

Is there a way that people know of that I can recover from this? I tried using an older project file and re inserting it and then compiling. It gives me a funky error which is probably because it isn't finding all the files it wants...

I really don't want to rebuild my project from scratch if possible.


EDIT

Ok, I did a diff between this and a slightly older project file that worked and saw that there was some corruption in the file. After merging them (the good and newest parts) it is now working.

Great points about the SVN. I have one, but there has been some funkiness trying to sync XCode with it. I'll definitely spend more time with it now... ;-)

解决方案

I came across this problem and my senior told me about a solution i.e:

Right click on your projectname.xcodeproj file here projectname will be the name of your project. Now after right clicked select Show Packages Contents. After that open your projectname.pbxproj file in a text editor. Now search for the line containing <<<<<<< .mine, ======= and >>>>>>> .r. For example in my case it looked liked this

<<<<<<< .mine
    9ADAAC6A15DCEF6A0019ACA8 .... in Resources */,
=======
    52FD7F3D15DCEAEF009E9322 ... in Resources */,
>>>>>>> .r269

Now remove those <<<<<<< .mine, ======= and >>>>>>> .r lines so it would look like this

    9ADAAC6A15DCEF6A0019ACA8 /* BuyPriceBtn.png in Resources */,

    52FD7F3D15DCEAEF009E9322 /* discussionForm.zip in Resources */,

Now save and open your Xcode project and build it. Everything will be fine.

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

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