Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

(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?

like image 451
dev6546 Avatar asked Aug 29 '12 14:08

dev6546


2 Answers

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.

like image 122
Ram G. Avatar answered Sep 22 '22 07:09

Ram G.


I'm guessing that this happened when testing the application on a device. It is because of your image static.png. It isn't a png file. Remove that file and try again. Also, I'm guessing that the application doesn't crush and the above mentioned image is not showing anywhere where it should. Try opening the file in photoshop and save it as a png.

like image 43
Andrei Filip Avatar answered Sep 21 '22 07:09

Andrei Filip