Xcode:没有一个输入目录包含匹配的应用程序图标/启动图像集
Posted
技术标签:
【中文标题】Xcode:没有一个输入目录包含匹配的应用程序图标/启动图像集【英文标题】:Xcode: None of the input catalogs contained a matching app icon / launch image set 【发布时间】:2017-01-11 17:23:49 【问题描述】:在尝试归档 ios 项目时,我的 Xcode 开始出现异常。
所有文件都在原来的位置 我试图返回上一个提交 尝试重启 Xcode 我也尝试过清理构建并手动删除整个构建文件夹 在项目设置中更改这些Asset Catalog App Icon Set Name
和 Asset Catalog Launch Image Set Name
重建 Images.xcassets
这些都没有帮助,我仍然看到同样的错误。
错误总是发生在构建过程的最后阶段(Compile asset catalogs
),。
Xcode 控制台:
CompileAssetCatalog build/Build/Intermediates/ArchiveIntermediates/reactproject/InstallationBuildProductsLocation/Applications/reactproject.app build/Build/Intermediates/reactproject/Images.xcassets
cd /Users/user/Developer/reactproject/ios
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/user/Developer/reactproject/ios/build/Build/Intermediates/ArchiveIntermediates/reactproject/IntermediateBuildFilesPath/reactproject.build/Release-iphoneos/reactproject.build/assetcatalog_dependencies --output-partial-info-plist /Users/user/Developer/reactproject/ios/build/Build/Intermediates/ArchiveIntermediates/reactproject/IntermediateBuildFilesPath/reactproject.build/Release-iphoneos/reactproject.build/assetcatalog_generated_info.plist --app-icon AppIcon --launch-image LaunchImage --compress-pngs --enable-on-demand-resources YES --sticker-pack-identifier-prefix com.example.reactproject.sticker-pack. --target-device iphone --target-device ipad --minimum-deployment-target 8.0 --platform iphoneos --product-type com.apple.product-type.application --compile /Users/user/Developer/reactproject/ios/build/Build/Intermediates/ArchiveIntermediates/reactproject/InstallationBuildProductsLocation/Applications/reactproject.app /Users/user/Developer/reactproject/ios/build/Build/Intermediates/reactproject/Images.xcassets
/* com.apple.actool.errors */
/Users/user/Developer/reactproject/ios/build/Build/Intermediates/reactproject/Images.xcassets: error: None of the input catalogs contained a matching app icon set named "AppIcon".
/Users/user/Developer/reactproject/ios/build/Build/Intermediates/reactproject/Images.xcassets: error: None of the input catalogs contained a matching launch image set named "LaunchImage".
/* com.apple.actool.notices */
/Users/user/Developer/reactproject/ios/build/Build/Intermediates/reactproject/Images.xcassets: warning: Failed to read file attributes for "/Users/user/Developer/reactproject/ios/build/Build/Intermediates/reactproject/Images.xcassets"
Failure Reason: No such file or directory
/* com.apple.actool.compilation-results */
/Users/user/Developer/reactproject/ios/build/Build/Intermediates/ArchiveIntermediates/reactproject/IntermediateBuildFilesPath/reactproject.build/Release-iphoneos/reactproject.build/assetcatalog_generated_info.plist
【问题讨论】:
【参考方案1】:有一个名为 Asset Catalog Launch Image Set Name (ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME
) 的构建设置,您需要在 Xcode 的构建设置中从目标中清除(您也可以从您喜欢的文本中的 .pbxproj
文件中删除相应的行编辑)。
背景:几年前,随着不同尺寸设备的大量涌现,Apple 转而使用预制 UI 文件 (.xib
) 作为启动屏幕来代替一系列静态图像。这曾经在目标 UI 的 General 选项卡中公开,但现在已经足够长了,因为使用它已将其删除,因此您必须在 Build Settings 选项卡中进行探索。
【讨论】:
【参考方案2】:文件 Images.xcassets 由 Asset Catalog Creator 工具重新生成,将其删除并将其添加回项目解决了该问题。将文件添加到Xcode项目时,需要正确设置引用。
【讨论】:
以上是关于Xcode:没有一个输入目录包含匹配的应用程序图标/启动图像集的主要内容,如果未能解决你的问题,请参考以下文章