What's the Xcode “no such file or directory error”?

前端 未结 8 1412
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-01 06:11

Xcode keeps prompting telling me I don\'t have a certain image in the project and it errors when I try to build. If I deleted the .png Xcode is complaining about from the pr

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-01 06:35

    Okay here's the unsatisfactory workaround that fixed it for me.

    (First, note that when I right-clicked my dodgy Group in the Project Navigator) it looked like any other group except that Open in External Editor was greyed - weird eh?)

    1. I closed XCode and restarted it.

      => Now I see all of the icons under the offending group are red (in the Project Navigator)

    2. Delete the entire group.

    3. Create a new group (same name) and drag-drop the icons from the original source into the group

      => Error failed to copy (or some such - I can't remember but I have seen and fixed this before - and seen it elsewhere on SO)

      This error is due to leftover icons, so to fix this one now,

    4. I deleted all other groups with icons and moved their icons to trash

    5. open finder at the project location
    6. delete every icon in the project (sort by kind, delete all the .png)
    7. make a new group again, and drag all the icons in _again.

    8. whew, now hit Builder

      => XCode crashes.

      Lovely.

    9. Restart Xcode

    10. fingers crossed: Build

    => it works. Brief celebration and back to work.

    (See what I mean about unsatisfactory)

提交回复
热议问题