xcode 资产目录编译器错误 - 没有输入目录包含名为“AppIcon”的匹配应用程序图标集

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27966247/
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-09-15 06:29:26  来源:igfitidea点击:

Asset Catalog Compiler Error - none of the input catalogs contained a matching app icon set named "AppIcon"

xcodeswift

提问by Paul Heiden

Asset Catalog Compiler Error - none of the input catalogs contained a matching app icon set named "AppIcon"

资产目录编译器错误 - 没有输入目录包含名为“AppIcon”的匹配应用程序图标集

回答by Sidharth J Dev

I had a similar problem and I think it was because I accidentally deleted the AppIconin Images.xcassets. So I will explain what I did.

我有一个类似的问题,我认为这是因为我不小心删除了AppIconin Images.xcassets. 所以我会解释我做了什么。

  1. Open the Images.xcassetsin the current project.
  2. Resize the window and move the window(Xcode) to the right.
  3. Start a new project in Xcode(a temporary one). Name it something like "temporaryApp".
  4. Open the Images.xcassetsin the temporaryApp. Here, you can see AppIcon.
  5. Click and drag this to Images.xcassetsof our previous app, that is placed at the right-hand side of the screen.
  1. Images.xcassets在当前项目中打开。
  2. 调整窗口大小并将窗口(Xcode)向右移动。
  3. 在 Xcode 中启动一个新项目(临时项目)。将其命名为“ temporaryApp”。
  4. Images.xcassets临时应用程序中打开。在这里,你可以看到AppIcon
  5. 单击并将其拖动到Images.xcassets我们之前的应用程序中,该应用程序位于屏幕的右侧。

And voila, Build Succeeded.

瞧,构建成功。

Hope this works for you

希望这对你有用

回答by PREMKUMAR

Please verify your settings is correct. Step 1Step 2

请验证您的设置是否正确。 第1步第2步

回答by Xin Chen

This once happened to me, and I solve it correctly with an easy way :->

这曾经发生在我身上,我用一种简单的方法正确解决了它:->

  1. choose the file "Images.xcassets", if your project does not have such a resource file, create it.

  2. click your mouse's right key in the blanket, and choose "New App Icon"

  3. build your project again, everything works fine now. IF NOT, check the project's "Build Settings", and find property "Asset Catalog App Icon Set Name" to see if it was "AppIcon".

  1. 选择文件“Images.xcassets”,如果你的项目没有这样的资源文件,创建它。

  2. 在毯子上单击鼠标右键,然后选择“新建应用程序图标”

  3. 再次构建您的项目,现在一切正常。如果不是,请检查项目的“构建设置”,并找到属性“资产目录应用程序图标集名称”以查看它是否为“AppIcon”。

回答by handicop

I had a same issue and I solved this way. For me, I added Apple Watch extension within this project and deleting them got me into this trouble.

我有同样的问题,我以这种方式解决了。对我来说,我在这个项目中添加了 Apple Watch 扩展并删除它们让我陷入了这个麻烦。

In the Images.xcassets, I do have "icon" and "info", but the error message was exactly same as yours but for "icon" set.

在Images.xcassets 中,我确实有“icon”和“info”,但错误消息与您的完全相同,但对于“icon”集。

So I searched within xCode project which contains "icon". and found xcodeproj file > build settings > Asset Catalog Compiler - Options with app icon set name as "icon".

所以我在包含“icon”的 xCode 项目中进行了搜索。并找到 xcodeproj 文件 > 构建设置 > 资产目录编译器 - 应用图标集名称为“图标”的选项。

So I deleted icon leave it blank and build again, IT WORKS.

所以我删除了图标,将其留空并重新构建,它有效。

enter image description here

在此处输入图片说明

回答by itsViksIn

This problem might be solved by removing the reference of .xcassetsfile and adding it back if the AppIcon and info is already setup. It worked for me when i removed the reference to Images.xcassetsand then added it to project again from Xcode.

.xcassets如果已经设置了 AppIcon 和信息,可以通过删除文件引用并将其添加回来来解决此问题。当我删除对的引用Images.xcassets然后将其从 Xcode 再次添加到项目时,它对我有用。

回答by Vadim F.

You have probably deleted the Appiconin a Assets.xcassets, you can fix it by going to Assets.xcassets-> hitting the + -> App Icons & Launch Image -> New iOS App Icon.

您可能已经删除了Appicona 中的Assets.xcassets,您可以通过转到Assets.xcassets-> 点击 + -> App Icons & Launch Image -> New iOS App Icon来修复它。

Here's an Image

这是一张图片