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

后端 未结 24 1853
猫巷女王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, the file was missing from the source control.
    To fix, I had to discard this file (be careful only discard the missing file not all your project):

    1. Xcode->Source Control->commit
    2. Right Click the missing file
    3. Choose Discard Changes
    0 讨论(0)
  • 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
    
    0 讨论(0)
  • 2020-12-04 08:45

    I had to manually go into Terminal and remove the files with git rm ProjectPath\aaa\xxx.png and then commit. After that everything worked fine.

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

    I worked it out.

    just open your third-party SVN tool, find the miss files, Revert; that's all.

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

    To add onto Alexander Vasenin's answer...

    First I Committed and Pushed my changes

    Xcode Main Menu > Source Control > Commit

    Then I Discarded All Changes to get rid of the errors

    Xcode Main Menu > Source Control > Discard All Changes

    After that, the errors stating "file xxx.png is missing from working copy" disappeared.

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

    This is occurred when you delete file on Xcode, but didnt tell svn server about it.

    Go to command line tool, and delete file directly.

    svn delete missingFile.m 
    

    and commit it

    svn commit -m "Deleting file"
    

    note that if you delete .svn folder, the warning is disappear but you will lost communication with svn server.

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