Weird error to do with images in xcode, uncategorised, pngcrush and copy png file error?

dev6546 picture dev6546 · Aug 29, 2012 · Viewed 12.7k times · Source
(null): While reading /Users/lewiselliott/Desktop/Final Version/2bm/2bm/static.png pngcrush caught libpng error:
(null): Could not find file: /Users/lewiselliott/Desktop/Final Version/2bm/build/Debug-iphoneos/2bm.app/static.png
Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlugIns/iPhoneOS Build System Support.xcplugin/Contents/Resources/copypng emitted errors but did not return a nonzero exit code to indicate failure

What does this mean and why has it only just started happening, how do I fix it?

Answer

Ram G. picture Ram G. · Jan 25, 2013

I had this problem. Two targets were added for same image. Goto project target ->Build Phases -> Copy Bundle Resources and search for your image file name. Most likely there are two entries. Remove one.