1

这是我的问题。我已经在我的项目中添加了一个新图像,以获取 iPhone 5 的启动图像。根据需要将其命名为 Default-568@2x.png。

我已将此图像放在我的项目目录中,然后通过拖放将其添加到我的项目中。我选择了选项:“将项目复制到目标组的文件夹(如果需要)”和“添加到目标:myProject”。

当我检查Builphase -> Copy Bundle Resources时,我的图像只出现一次,并且路径良好。

但是在构建我的项目时,我遇到了这个错误:

While reading /Users/admin/Desktop/Projets tests/myProject/Resources/build/Default-568h@2x.png pngcrush caught libpng error:   Not a PNG file
Could not find file: /Users/admin/Library/Developer/Xcode/DerivedData/myProject-fjnhmdxkawhvkgecsmmrbgcwqaxk/Build/Products/Debug-iphoneos/myProject.app/Default-568h@2x.png
Command /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/copypng emitted errors but did not return a nonzero exit code to indicate failure

我究竟做错了什么?

4

1 回答 1

2

Default-568h@2x.png 不是有效的 png 文件。无论您的设计师只是将任何 jpeg 文件重命名为 png 文件,还是您自己将其重命名为这个。

因此,只需删除此 png 文件并重新添加一个具有正确格式和尺寸的有效 Default-568h@2x。

于 2013-05-01T06:35:03.060 回答