Xcode: issue “file xxx.png is missing from working copy” at project building

后端 未结 24 2093
猫巷女王i
猫巷女王i 2020-12-04 08:22

After deleting/adding some png files to project, i have got messages when building project.

\"file ProjectPath\\aaa\\xxx.png is missing from working copy.\"

24条回答
  •  情歌与酒
    2020-12-04 08:44

    In my case it was a problem with git and a case-insensitive file system.

    I had inadvertently submitted the same file twice, using file paths that differed only in case:

    MyProject/Resources/foo.png
    MyProject/resources/foo.png
    

    Xcode was complaining about one of the missing files.

    Fixed by deleting the offending files, and re-adding.

    cd MyProject
    mv Resources/foo.png /tmp
    git rm Resources/foo.png
    git rm resources/foo.png
    git commit
    mv /tmp/foo.png Resources
    git add Resources/foo.png
    git commit
    

提交回复
热议问题