Build app with Xcode 4 - it always show some error about PNG image

前端 未结 22 992
走了就别回头了
走了就别回头了 2020-12-07 12:46

When I build my app with Xcode 4 it always show this error message:

CopyPNGFile /Users/michaelchen/Library/Developer/Xcode/DerivedData/iMusicBox-boeawugacmha         


        
相关标签:
22条回答
  • 2020-12-07 13:07

    Found it!!

    You have to save your PNG files as NOT INTERLACED. Try to open the file in photoshop (or similar), save as, and select "Not interlaced".

    It is working in my case

    hope this helps

    0 讨论(0)
  • 2020-12-07 13:07

    Try to find and resave this *.PNG files using "Preview", to be exact: File - Export... - "save as PNG". It seems to me, that it happens when you saving image in Photoshop with mode "Save for Web" and after this image will be saved with special compressing (LZW). That's all, good luck!

    0 讨论(0)
  • 2020-12-07 13:10

    Follow the steps:

     1. Take an image. 
    
     2. Rename it to the showing error png's name. 
    
     3. Drag it back to the Xcode.
    
    0 讨论(0)
  • 2020-12-07 13:11

    In my case I discovered my corrupted png wouldn't open in photoshop. I opened in preview, saved as psd, and then saved again from photoshop (save-as -> png -> not-interlaced). Compiles fine now in xcode 4.

    0 讨论(0)
  • 2020-12-07 13:14

    It may be the "Compress PNG Files" setting (from the Packaging section of Build Settings).

    I solved this error by switching it to "No".

    0 讨论(0)
  • 2020-12-07 13:15

    Check that you don't have duplicate entries in the Target's "Build Phase"-> "Copy Bundle Resources"

    0 讨论(0)
提交回复
热议问题