2

I've just finished my project and I was trying to add the correct Default images to it.

I got a build error with pngcrush so I deleted the Default images and tried re-adding them...

Now I get build failed and this error...

CopyPNGFile "/Users/me/Library/Developer/Xcode/DerivedData/appName-focehhxhholrseatdpjqdglseomk/Build/Products/Debug-iphoneos/appName.app/Default@2x.png" "i-snapshot/Default@2x.png"
    cd /Users/me/Documents/appName
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng -compress "" "/Users/me/Documents/appName/appName/Default@2x.png" "/Users/me/Library/Developer/Xcode/DerivedData/appName-focehhxhholrseatdpjqdglseomk/Build/Products/Debug-iphoneos/appName.app/Default@2x.png"

Can't find /Users/me/Documents/appName/appName/Default@2x.pngCommand /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng failed with exit code 1

I've tried:

  • Adding the files back in.
  • Adding then deleting again.
  • Deleting derived data.
  • Clean and build.

now I'm stuck, no idea what to do and the app just won't build at all.

Fogmeister
  • 76,236
  • 42
  • 207
  • 306
  • 1
    OMG, panic over. I just saw the "Can't find..." message whilst posting this question. I added the files back into that folder (no idea why) and now it works :D "Phew" does not fully convey what I am feeling right now. – Fogmeister Feb 25 '13 at 15:01
  • 1
    Did you do a full clean of your build folder? It's the 'clean' command in the menu with a modifier key - hold done the.. option or command key - I forget, to do a full clean. – spring Feb 25 '13 at 15:01
  • Ah, I didn't know about that. I will try it next time though. Just did a full clean now and it seems to be working again. Thanks :D – Fogmeister Feb 25 '13 at 15:02

2 Answers2

20

Delete the png to "Copy Bundle Ressources" :

Delete the png to Copy Bundle Ressources

VivienCormier
  • 1,133
  • 1
  • 11
  • 16
3

Goto project target ->Build Phases -> Copy Bundle Resources

and search for your image file name

and remove duplicate image file name