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

后端 未结 24 1852
猫巷女王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:22

    Got this for every project after moving on to XCode 8. This solved it:

    With Option Key pressed, Product (in title menu) -> Clean Build Folder.

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

    You can also disable source control by unchecking

    Xcode -> Preferences -> Source Control -> Enable Source Control

    if you're managing it via command line or any other app.

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

    I had same problem and solved it by add git . Open Command Line Tool

    cd "project folder path"
    git add .
    

    Later,restart Xcode project and open your project again.

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

    I had a similar issue with a handful of files that had long since been deleted from my Xcode project while I was still using Xcode 7.

    My solution was to:

    1. Create files with the names Xcode was complaining about (they don't need any content)
    2. Add the files to my Xcode project (in Xcode right click on my main project directory, click Add files to my_project_name and select the files that were just created
    3. Select the newly added files and delete them - select move to trash.

    This got rid of the warnings for me.

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

    In my case, Xcode had somehow found old .svn directories that referenced the missing files. I had to go up a level above my project folder to find those .svn files. Once deleted, I restarted Xcode and everything was fine.

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

    For me the following worked:

    Since I do not and did never use Git, I created a new project (XCode 8, I could not see the usual "use Git" or however the checkmark was labeled). Then I bluntly deleted all the files in this new project; went to the old messed up project, copied everything in the project folder, came back to the newly created project, pasted the old stuff, opened that - all the warnings about files that have not been existing for months are gone. Fingers crossed.

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