Xcode 4.5 - CopyPNGFile persists. Need new ideas

2020-06-09 07:46发布

I'm making an iPad app and it runs on the simulator, but fails when i try building it for the device.

the error is below:

enter image description here

These are the things i've tried to rectify this issue:

  • went through every PNG file with Photoshop and saved them again w/o the interlace
  • Deleted all the images in my Resources folder and added them again by dragging/dropping the images again
  • Deleted ALL PNG images (left the JPGs) and it works...when i add one PNG, Xcode throws a hissy fit.
  • Deleted the derivedData in my ~Library/Developer/Xcode
  • quit Xcode and tried again
  • restarted my computer and tried again.

i tried checking about the paths, but i'm not sure. Any ideas would be great please.

Addendum i also want to add that Xcode is throwing errors against its own Default@2x.png and Default.png!

9条回答
混吃等死
2楼-- · 2020-06-09 08:26

The error can also occure if you save the file in an unexpected format of what it actually supposed to be. For instance, you save a *.png but with a .jpg encoding. Make sure that the file format is the one you actually want.

查看更多
放我归山
3楼-- · 2020-06-09 08:37

Build Settings -> Search for Compress PNG Files and set to NO . This helped me

查看更多
冷血范
4楼-- · 2020-06-09 08:39

You have to save your PNG files as NOT INTERLACED. For example, by using Photoshop, go to menu File->Save For Web and Devices. Unchecked the box of 'Interlaced' and save the file. Usually interlaced box is unchecked already. Hope that helps

查看更多
SAY GOODBYE
5楼-- · 2020-06-09 08:39

Check out this, this might be help you.Or delete bkg1.png from your project.

查看更多
对你真心纯属浪费
6楼-- · 2020-06-09 08:43

Well, i figured it out. The error log was a bit misleading since it says "Reason: Image not Found" right before the red highlight.

Turns out the "image" isn't the PNG or JPG, but the liberal.dylib as explicitly mentioned above. No idea how my perl library is gone...

查看更多
倾城 Initia
7楼-- · 2020-06-09 08:45

For me this error was occurring when the png was listed in the copy bundle resources phase on the build phases tab. See https://stackoverflow.com/a/5659415/287403

查看更多
登录 后发表回答