今天下午在消除项目各类警告的时候,发现了下面这类警告:

Asset Catalog Compiler Warning Group

其中,有一类警告是这样的:Xcode把它叫做Ambiguous Content

描述:The app icon set “AppIcon” has an unassigned child.

有图有证据:
Asset Catalog Compiler Warning Group

解决方案:
点击警告,在AppIcon预览里拉到底部,发现多了一个未赋值的子项,将其选中删除即可。

还有一类警告是这样的:Xcode把它叫做Missing Content

描述:
The file “Default.png” for the image set “LaunchImage” does not exist.

The file “[email protected]” for the image set “LaunchImage” does not exist.

The file “[email protected]” for the image set “LaunchImage” does not exist.

有图有证据:
Asset Catalog Compiler Warning Group

(根据这类警告的名称Missing Content,很明显是对应的文件内容缺失了)
解决方案:
1、右键单击警告项,“Show in Finder”跳转至本机目录下的资源文件中。
Asset Catalog Compiler Warning Group

2、选中并打开Contents.json,寻找缺失的图片资源名称,并将其对应的内容删除,保存当前文件。
Asset Catalog Compiler Warning Group

3、重新编译,警告消除。

相关文章:

  • 2021-11-25
  • 2022-01-26
  • 2021-07-02
  • 2022-02-26
  • 2022-12-23
  • 2022-01-12
  • 2022-01-26
  • 2021-09-16
猜你喜欢
  • 2021-08-15
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
  • 2022-01-11
  • 2021-05-30
  • 2021-11-26
相关资源
相似解决方案