ios copypng 失败,退出代码为 1

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11867278/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-30 19:39:19  来源:igfitidea点击:

copypng failed with exit code 1

ios

提问by azamsharp

I am getting the following error when building my iPhone application. The reddarkedge.png is right there in the supporting files folder.

构建我的 iPhone 应用程序时出现以下错误。reddarkedge.png 就在支持文件文件夹中。

/Users/azamsharp/Desktop/UltraCam/UltraCam/TCam/reddarkedge.pngCommand /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/PrivatePlugIns/iPhoneOS Build System Support.xcplugin/Contents/Resources/copypng failed with exit code 1

Even if I remove the reddarkedge.png from the project it still gives me the same error.

即使我从项目中删除 reddarkedge.png 它仍然给我同样的错误。

enter image description here

在此处输入图片说明

UPDATE SOLUTION:

更新解决方案:

Turns out I had to hard delete them.

原来我不得不硬删除它们。

采纳答案by zorn

When you say "Even if I remove the reddarkedge.png from the project" when you remove it from the Xcode file navigator does it get removed from the copy bundle step of the target build process? If not maybe manually delete it there as well?

当您从 Xcode 文件导航器中删除它时说“即使我从项目中删除了 reddarkedge.png”,它是否会从目标构建过程的复制包步骤中删除?如果不是,也可以手动删除它?

You could also try highl

你也可以试试highl

You might also try opening the XML project file in a text editor and removing the reference by hand. Make sure to have a backup in case you have problems though.

您也可以尝试在文本编辑器中打开 XML 项目文件并手动删除引用。确保有备份,以防万一你有问题。

Best of luck.

祝你好运。

回答by Blazer

Had the sameproblem with the CopyPNG error. Place the image in your project again and use the program ImageOptimover your images, this solved the problem. Maybe it will also solve your problem.

有与 CopyPNG 错误相同的问题。再次将图像放入您的项目中,并在您的图像上使用ImageOptim程序,这解决了问题。也许它也能解决你的问题。

Or

或者

Check the "Copy bundle resources" build stage to see if there are any missing files (png, txt, plist, etc.)

检查“复制捆绑资源”构建阶段以查看是否有任何丢失的文件(png、txt、plist 等)

回答by RameshVel

Most of the time this happens when you missed to check the Copy items if neededwhile adding the images.

大多数情况下,当您Copy items if needed在添加图像时错过检查时会发生这种情况。

回答by BharathRao

I actually referenced the app icon image from Desktop.But, accidentally I deleted that image and got this error. After that I have added the image in the Desktop with same name and build got succeeded. So please make sure that, if you are missing something like this. Hope this will help somebody!!!

我实际上从桌面引用了应用程序图标图像。但是,我不小心删除了该图像并出现此错误。之后,我在桌面中添加了具有相同名称的图像并且构建成功。所以请确保,如果你错过了这样的东西。希望这会帮助某人!!!