ios7 - Assets 目录错误 : CUICatalog: Can't find rendition for name

标签 ios7 xcode5 asset-catalog

突然之间,虽然我这边没有明显的变化,但我的 Assets 目录中的一张图片出现了以下错误:

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"

我曾尝试删除图像 Assets 并重新添加它们,但无济于事。这个问题发生在模拟器和设备中。奇怪的是,我仍然可以在 Storyboard中看到图像。将图像直接添加到项目中也可以。

有没有其他人见过这个错误?怎么回事?

最佳答案

Update: CocoaPods 0.28.0 appears to have resolved this issue.

您是否使用 CocoaPods 来管理您的依赖项?这可能是最近的更新导致的。

我最近在通用应用程序中遇到了同样的问题。包含单独的、特定于设备的资源的图像集在构建后仅包含用于单一设备类型的 Assets 。我同样没有对围绕这些 Assets 的项目进行明显的更改,而且我的 Storyboard看起来是正确的。

谷歌搜索后,我发现在主要 CocoaPods 项目 ( https://github.com/CocoaPods/CocoaPods/issues/1520 ) 上报告的 Assets 目录存在问题,并意识到更新 CocoaPods 可能是不明显的变化。

将我安装的 CocoaPods 从 0.27.1 回滚到 0.26.2,支持在 Pod 依赖项中编译 xcassets 之前的版本似乎暂时解决了这个问题。我会密切关注即将发布的版本,因为这方面的开发似乎非常活跃。

关于ios7 - Assets 目录错误 : CUICatalog: Can't find rendition for name,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19691482/

相关文章:

macos - 如何在 Cocoa MacOS Webview 中显示简单的文本消息(toasts/alerts)?

ios - 无法在 xcode 5 中更改应用程序的名称

ios - 如何使通用 Xcode 5 应用程序项目以横向启动?

ios - xcode - Assets 目录 - 图像类型 - 相同比例 - 不同分辨率

xcode - 在运行时将图像保存在 Assets 目录中

ios - 如何使用 UISwipeGestureRecognizer 为左/右滑动 View 设置动画

ios - 更改 CGRect 然后单击文本字段返回到原始位置

ios - 这个 SpriteKit 设置中的坐标系有什么问题?

ios - subview Controller 中的 topLayoutGuide

ios - 在 Xcode 7 损坏的 Assets 目​​录中使用 .jpg 图像