iPad: PNG Crush error

Getsy picture Getsy · Mar 22, 2011 · Viewed 47.6k times · Source

I am trying port my iPad project to latest iPad 2. I installed iOS 4.3 SDK with Xcode 4.0. When i try to build my project, i'm getting the following error. I don't know why am i getting this error. Could someone help me to resolve this build error?

While reading /Users/username/Desktop/iPAD/MyProject/trunk/Resourses/images/top_bar.png pngcrush caught libpng error: Not a PNG file..

Could not find file: /Users/username/Library/Developer/Xcode/DerivedData/Project-fmhveawksgdtnraclfizuhrekmzi/Build/Products/Debug-iphoneos/MyApp-Upgraded.app/top_bar.png

Answer

Guillaume Laurent picture Guillaume Laurent · May 26, 2012

I had the same problem, but it wasn't because of a corrupted png : it was because two PNG files had the same filename in different directories of my source tree. What was peculiar was that the errors (I had 4 files which had "twins") were not identical from one build to another. On one run I had errors on all files, on the other only on some of them.