首页 > 解决方案 > 使用 MaterialComponents 框架时出现“找不到图像”错误

问题描述

“我正在使用 MaterialComponents 框架。使用 pod 安装后,它在情节提要中隐藏了我的一些视图控制器,因此我无法编辑它,但程序运行正常。重新安装它可以消除错误”

它还突出显示错误,例如“无法为 UIViewController() 渲染和更新自动布局状态:dlopen..ionalization 引用自:MaterialComponents.framework 原因:找不到图像”

有人可以帮我吗。

标签: swiftxcodecocoapodsmaterial-componentsmaterial-components-ios

解决方案


这个问题似乎与该框架无关,但 pod 安装在某处已损坏。你可以试试这个:

  1. 清理项目:产品 -> 清理构建文件夹(或 Command + Shift + K)
  2. 删除项目的派生数据:rm -r ~/Library/Developer/Xcode/DerivedData/YOUR_PROJECT-xxxxx
  3. 重启 Xcode
  4. 重新安装 pod

推荐阅读