资产目录错误:CUICatalog:无法找到名称的再现 [英] Asset Catalog Error: CUICatalog: Can't find rendition for name

查看:143
本文介绍了资产目录错误:CUICatalog:无法找到名称的再现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

突然间,由于我的结果没有明显变化,我现在从资产目录中的图像中收到以下错误:

All of a sudden, and through no apparent changes on my end, I am now getting the following error from an image in my asset catalog:

2013-10-30 14:44:46.629 MyApp[38590:a0b] CUICatalog: Can't find rendition for name: LoginBackground scale factor: 2 device idiom: 1 device subtype: 0
2013-10-30 14:44:46.638 MyApp[38590:a0b] Could not load the "LoginBackground" image referenced from a nib in the bundle with identifier "com.mybundleid"

我尝试删除图像资源并重新添加它们,但无济于事。问题出现在模拟器和设备中。奇怪的是,我仍然可以在故事板中看到图像。将图像直接添加到项目中也很有效。

I have tried removing the image assets and re-adding them, to no avail. The issue is happening in the simulators as well as devices. And oddly enough I can still see the image in the storyboard. Adding the images directly to the project worked as well.

有没有人见过这个错误?发生了什么?

Has anyone else ever seen this error? What's going on?

推荐答案


更新:CocoaPods 0.28.0似乎解决了这个问题。

Update: CocoaPods 0.28.0 appears to have resolved this issue.

您是否使用CocoaPods来管理您的依赖项?最近的更新可能会造成这种情况。

Are you using CocoaPods to manage your dependencies? It's possible a recent update has caused this.

我最近遇到了与通用应用程序相同的问题。包含单独的特定于设备的资源的映像集仅包括构建后单个设备类型的资产。我同样对围绕这些资产的项目没有明显的改变,我的故事板看起来是正确的。

I encountered the same issue with a universal app recently. Image sets that included separate, device-specific resources only included assets for a single device type after build. I similarly had made no apparent changes to the project around these assets and my storyboards appeared correct.

在谷歌搜索后,我发现主要CocoaPods项目报告的资产目录问题( https://github.com/CocoaPods/CocoaPods/issues/1520 )并实现或许更新CocoaPods可能是不明显的变化。

After Googling around, I discovered issues with Asset Catalogs reported on the main CocoaPods project (https://github.com/CocoaPods/CocoaPods/issues/1520) and realised that perhaps updating CocoaPods could be the change that wasn't apparent.

将我的CocoaPods安装从0.27.1回滚到0.26.2,包括支持之前的版本为了在Pod依赖项中编译xcassets,似乎已经解决了这个问题。我将关注即将发布的版本,因为这个领域似乎有非常积极的发展。

Rolling back my installation of CocoaPods from 0.27.1 to 0.26.2, the release before support was included for compiling xcassets in Pod dependencies, appears to have fixed this issue for now. I'll be keeping an eye on upcoming releases as it seems there is very active development in this area.

这篇关于资产目录错误:CUICatalog:无法找到名称的再现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆