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
Asset Catalog Compiler Error - none of the input catalogs contained a matching app icon set named "AppIcon"
提问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 AppIcon
in Images.xcassets
. So I will explain what I did.
我有一个类似的问题,我认为这是因为我不小心删除了AppIcon
in Images.xcassets
. 所以我会解释我做了什么。
- Open the
Images.xcassets
in the current project. - Resize the window and move the window(Xcode) to the right.
- Start a new project in Xcode(a temporary one). Name it something like "temporaryApp".
- Open the
Images.xcassets
in the temporaryApp. Here, you can seeAppIcon
. - Click and drag this to
Images.xcassets
of our previous app, that is placed at the right-hand side of the screen.
Images.xcassets
在当前项目中打开。- 调整窗口大小并将窗口(Xcode)向右移动。
- 在 Xcode 中启动一个新项目(临时项目)。将其命名为“ temporaryApp”。
Images.xcassets
在临时应用程序中打开。在这里,你可以看到AppIcon
。- 单击并将其拖动到
Images.xcassets
我们之前的应用程序中,该应用程序位于屏幕的右侧。
And voila, Build Succeeded.
瞧,构建成功。
Hope this works for you
希望这对你有用
回答by PREMKUMAR
Please verify your settings is correct.
请验证您的设置是否正确。
回答by Xin Chen
This once happened to me, and I solve it correctly with an easy way :->
这曾经发生在我身上,我用一种简单的方法正确解决了它:->
choose the file "Images.xcassets", if your project does not have such a resource file, create it.
click your mouse's right key in the blanket, and choose "New App Icon"
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".
选择文件“Images.xcassets”,如果你的项目没有这样的资源文件,创建它。
在毯子上单击鼠标右键,然后选择“新建应用程序图标”
再次构建您的项目,现在一切正常。如果不是,请检查项目的“构建设置”,并找到属性“资产目录应用程序图标集名称”以查看它是否为“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.
所以我删除了图标,将其留空并重新构建,它有效。
回答by itsViksIn
This problem might be solved by removing the reference of .xcassets
file and adding it back if the AppIcon and info is already setup. It worked for me when i removed the reference to Images.xcassets
and then added it to project again from Xcode.
.xcassets
如果已经设置了 AppIcon 和信息,可以通过删除文件引用并将其添加回来来解决此问题。当我删除对的引用Images.xcassets
然后将其从 Xcode 再次添加到项目时,它对我有用。
回答by Vadim F.
You have probably deleted the Appicon
in a Assets.xcassets
, you can fix it by going to Assets.xcassets
-> hitting the + -> App Icons & Launch Image -> New iOS App Icon.
您可能已经删除了Appicon
a 中的Assets.xcassets
,您可以通过转到Assets.xcassets
-> 点击 + -> App Icons & Launch Image -> New iOS App Icon来修复它。