CopyPNGFile error

寵の児 提交于 2019-12-04 01:46:05
Davide

Solved here -> https://stackoverflow.com/a/18297130/1451462

I removed the duplicate references in my png files!

Build Phases -> Copy Bundle Resources

and removed all the duplicated entries of lunch images DefaultXX.png

I had the same problem, in my case the image causing the problem was a JPG renamed manually in PNG. I suggest you to open the image in a Image Editor (Gimp, Photoshop...) and save it as PNG.

i face this problem an i solved as @Davide answer
you need to remove any reference for that image after that clean and build and problem will be fixed

To solve this issue open your image (about2 copy.png) in photoshop or gimp or any similar image editor. While saving(save as) your image check it as NOT INTERLACED.

Build your project again will remove the error.

I have this happen periodically, my solution, copy the images away, delete them from xcode, then copy them back. Fixes it every time.

Delete the file reference from xcode -> click your project -> Build Phases -> Copy Bundle Resources. Then, add the file again to your project.\

or

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

or

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.

In my case, I just removed the "$" character from the image name. My case was that, I have image called imagex.png, then I removed that image and added one called imagex$xxx.png, then I got that error, everything went well when I just removed the dollar sign from the name.

Delete the file reference from xcode -> click your project -> Build Phases -> Copy Bundle Resources. Then, add the file again to your project.

I had the same problem. I have fixed it. In my case. This error occurs because I have multiple files with the same name. To fix this. I delete remove the files from my project and the import again. Instead of create a group in project. I create a folder reference and everything works great as I expected!

Just remove the image file from the Xcode project, rename it as you want on FINDER and then readd it to you project. I just had this problem a while ago.

This is due to copy of image of same name in Project.

if there are icons in the exact path. you should check that all the icons are really png . just open icons in some editors and save as the icon in png format

Found those images are red in color in project.Simply deleting & readding them worked.

Just try deleting the .png extension for the files which are causing you the trouble. Don't know how, but worked for me!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!