ios Watchkit AppIcon - 名为“AppIcon”的应用图标集没有任何适用的内容
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29335509/
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
Watchkit AppIcon - The app icon set named "AppIcon" did not have any applicable content
提问by Ing. Ron
There is the Images.xcassets file in my WatchKit App. As soon as I put any icon in that asset build failed with the error message: "The app icon set named "AppIcon" did not have any applicable content."
我的 WatchKit 应用中有 Images.xcassets 文件。一旦我将任何图标放入该资产构建失败并显示错误消息:“名为“AppIcon”的应用程序图标集没有任何适用的内容。
回答by Kevin Qi
This is an easy method to generate your WatchKit icons, which worked well for me:
这是一种生成 WatchKit 图标的简单方法,对我来说效果很好:
- Upload a source image to http://makeappicon.com
- Go to Images.xcassets in the WatchKit app
- Right click on the pane which includes AppIcon, select "Import...", and choose the watchkit folder that makeappicon.com generated for you
- 将源图像上传到http://makeappicon.com
- 转到 WatchKit 应用程序中的 Images.xcassets
- 右键单击包含 AppIcon 的窗格,选择“导入...”,然后选择 makeappicon.com 为您生成的 watchkit 文件夹
回答by Sam B
Most likely your watchKit app icons are not of the correct size. You need the following sizes
很可能您的 watchKit 应用程序图标的大小不正确。您需要以下尺寸
(these are all in pixels)
48 x 48
55 x 55
58 x 58
80 x 80
87 x 87
88 x 88
172 x 172
196 x 196
Basically all the numbers you see in at bottom under Images.xcassets you need to double them as they need to be retina display.
基本上,您在 Images.xcassets 底部看到的所有数字都需要将它们加倍,因为它们需要视网膜显示。
回答by Saravana Kumar
回答by Jervisbay
In my case, I generated the images with required dimensions from Sketch. I then dragged and dropped the png files into the spots. No complaints from Xcode. My app doesn't use watch kit.
就我而言,我从 Sketch 生成了具有所需尺寸的图像。然后我将 png 文件拖放到斑点中。没有来自 Xcode 的抱怨。我的应用程序不使用手表套件。
However build failed with the error message, "The app icon set named “AppIcon” did not have any applicable content". There were also warnings about the wrong dimensions of the image files. Not sure how Sketch did that but I went back and reconfigured export from Sketch, verified the exported dimensions, drag the new files back to the app icon spots in Xcode. This time build was successful.
但是构建失败并显示错误消息“名为“AppIcon”的应用程序图标集没有任何适用的内容”。还有关于图像文件尺寸错误的警告。不确定 Sketch 是如何做到的,但我返回并重新配置了从 Sketch 的导出,验证了导出的尺寸,将新文件拖回 Xcode 中的应用程序图标点。这次构建成功。
Morality, if you see this error message, double check your image dimensions.
道德,如果您看到此错误消息,请仔细检查您的图像尺寸。
回答by Tim
回答by Tim
Lets write it down into lazy mode easy version, all other answers were confusing me the hell out. i hope following help others.
让我们把它写成懒惰模式的简单版本,所有其他的答案都让我感到困惑。我希望以下能帮助别人。
Step 1: AppIcon was empty
第 1 步:AppIcon 为空
Step 2: Want to add icon
第 2 步:要添加图标
so from AppIcon > on row1, col1 on 2x > i drag and dropped, the following invalid image:
所以从 AppIcon > on row1, col1 on 2x > i 拖放,以下无效图像:
Which had actual size as below:
其实际尺寸如下:
Step 3: when i did build compile, it failed.
第 3 步:当我进行构建编译时,它失败了。
Step 4: after searching
第 4 步:搜索后
i found that for 2x the image size should be 40px by 40px so i modified that image into 40px by 40px from that invalid value.
我发现对于 2x,图像大小应该是 40 像素 x 40 像素,所以我将该图像从无效值修改为 40 像素 x 40 像素。
Step 5: Info.plist added entry as below.
第 5 步:Info.plist 添加如下条目。
This time the build/compile worked and in my iPhone 7 i have the new icon.
这次构建/编译工作了,在我的 iPhone 7 中,我有了新图标。
回答by Priti Kanauziya
Go to MakeAppIcon website, upload your image of AppIcon . It will automatically generate all resize images , give your mail id and get the zip file . And make sure when you upload in Assets.xcassets you used a OPT very clearly for image which size is 2x or 3x depending on your requirement .
转到 MakeAppIcon 网站,上传您的 AppIcon 图像。它将自动生成所有调整大小的图像,提供您的邮件 ID 并获取 zip 文件。并确保当您在 Assets.xcassets 中上传时,您非常清楚地使用了 OPT 来处理大小为 2x 或 3x 的图像,具体取决于您的要求。
回答by Exile3daime
I solved the problem!
我解决了问题!
originally I only selected Apple Watch checkbox in Xcode 6 and run very well. However, I got the same error in Xcode 7 without modifying anything. My solution is to select CarPlay checkboxin addition and put in two square icons with 120px and 180px for CarPlay. Now I can run my watchapp finally.
最初我只在 Xcode 6 中选择了 Apple Watch 复选框并且运行得很好。但是,我在没有修改任何内容的情况下在 Xcode 7 中遇到了同样的错误。我的解决方案是另外选中 CarPlay 复选框,并为 CarPlay 放入两个 120 像素和 180 像素的方形图标。现在我终于可以运行我的手表应用程序了。
However, it cannot be accepted for submitting to Apple Store...
但是,不能提交到Apple Store...