Unable to open project… cannot be opened because the project file cannot be parsed

前端 未结 21 2041
有刺的猬
有刺的猬 2020-12-04 08:34

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...

<
相关标签:
21条回答
  • 2020-12-04 09:05

    I got this exact same error because Cordova will allow you to create a project with spaces in it, and Xcode doesn't know how to deal.

    0 讨论(0)
  • 2020-12-04 09:05

    Revert the project.pbxproj

    svn revert --filename--

    0 讨论(0)
  • 2020-12-04 09:05

    It sounds like you're going to have to create a new project in Xcode, go into the old directory, and drag all your source files, nibs, and resources into the Xcode files sidebar in the new project. It shouldn't take more than a few minutes, unless you really did a lot of work with custom build settings or targets. Either that, or revert to the last check-in in your source control and manually add any code files which changed between now and then.

    0 讨论(0)
  • 2020-12-04 09:08

    Goto PhoneGapTest>>platform Then delete the folder ios after that go to terminal then type: sudo phonegap build ios after that you can run the project

    0 讨论(0)
  • 2020-12-04 09:08

    By reverting, you can undo pulled code.

    If you want to undo that pull request just put this command on project path

    --> git merge --abort

    0 讨论(0)
  • 2020-12-04 09:10

    I faced the same problem recently when trying to merge my branch with a remote branch. However, none of the above solutions seemed appropriate to my problem.

    There were no merge conflicts between the project.pbxproj file in my branch or the remote branch. However, my projectName.xcodeproj file would refuse to open for the same reason as shown in the asked question.

    My solution was to look through the project.pbxproj using a text editor and find if there were any irregularities in the file syntax (for e.g. an extra curly bracket). I sped this process up by focusing on the lines which were inserted or deleted in old file as compared to the merged file. On closer examination, I found the cause of my problem was the repetition of the following line :

    xxxxxxxxxxxxx /* [CP] Check Pods Manifest.lock */ = {
    

    in my merged file. This led to an unclosed curly bracket and consequent invalid pbxproj syntax. Deleting the above line fixed my problem.

    0 讨论(0)
提交回复
热议问题