xcode 应用程序图标有未分配的图像错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29433670/
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
App Icon has Unassigned Image error
提问by SRMR
I'm getting these errors:
我收到这些错误:
I can't tell exactly which thing it is talking about?
我不能确切地说出它在谈论什么?
If it is a 42 mm 2x, then I don't have a spot to put that. Can you help? Thanks!
如果它是 42 mm 2x,那么我就没有地方放了。你能帮我吗?谢谢!
EDIT: Per comment below, I looked on the right pane. Looks like it needs the 44 2x...
编辑:根据下面的评论,我查看了右侧窗格。看起来它需要 44 2x ...
...so I have one created, but the Unassigned
doesn't highlight when I drag the icon over it, so how do I assign it in my image assets?
...所以我创建了一个,但是Unassigned
当我将图标拖到它上面时它没有突出显示,那么我如何在我的图像资产中分配它?
EDIT again:
Right click show in finder?
再次编辑:右键单击在查找器中显示?
回答by esvau
I had the same issue! The solution that worked for me was pretty easy:
我遇到过同样的问题!对我有用的解决方案非常简单:
Just selectthe unassigned imageand deleteit via delete button. Cleanand Build. Done.
只要选择的未分配的图像和删除通过删除按钮它。清洁和构建。完毕。
Hope this helps!
希望这可以帮助!
回答by Darkseal
(That's assuming you didn't miss any of the required images)
(假设您没有错过任何所需的图像)
I had this problem a while ago: I went into the media.xcassets
directory and checked the contents.json
file, where I found some entry with "unassigned"
set to TRUE. I removed it and it removed the compiler warning.
不久前我遇到了这个问题:我进入media.xcassets
目录并检查了contents.json
文件,在那里我发现了一些"unassigned"
设置为 TRUE 的条目。我删除了它,它删除了编译器警告。
Hope you got stuck in that same scenario so you will also be able to fix it.
希望您陷入同样的情况,以便您也能够解决它。
回答by Idan
Remove all "unassigned" photos from the asset catalog. It shouldn't appear there (click "Remove Selected Items" on your screenshot).
从资产目录中删除所有“未分配”的照片。它不应该出现在那里(单击屏幕截图上的“删除所选项目”)。
回答by Nate
I had to
我不得不
- right click on one of the images in the lower row (with "unassigned" written under the row)
- select "Universal" to unselect it
- right click and
- "Universal" again to select it
- This changed the top row to show 3 empty boxes that were empty
- Drag each of the images from the unassigned row to the universal row
- 右键单击下一行中的一个图像(在该行下写上“未分配”)
- 选择“通用”取消选择它
- 右键单击并
- 再次“通用”选择它
- 这将顶行更改为显示 3 个空框
- 将每个图像从未分配的行拖到通用行
Though, I don't know why those menu options are disabled in the original question...
虽然,我不知道为什么这些菜单选项在原始问题中被禁用......
回答by TreeAndLeaf
I had old icon files (no longer needed) in the folder where contents.json is located. I removed those files in Finder and the issue was solved.
我在 contents.json 所在的文件夹中有旧的图标文件(不再需要)。我在 Finder 中删除了这些文件,问题就解决了。