Xcode: 没有一个输入目录包含匹配的应用程序图标/启动图像集。

3
我的Xcode在尝试对一个iOS项目进行存档时出现问题。
  • 所有文件都在其原始位置上
  • 我尝试回到之前的提交版本
  • 尝试重新启动Xcode
  • 我还尝试过清洁构建并手动删除整个构建文件夹
  • 更改项目设置中的这些内容 Asset Catalog App Icon Set NameAsset 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
2个回答

3

有一个名为 Asset Catalog Launch Image Set Name(ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME)的构建设置,您需要从Xcode的构建设置中清除它(您还可以在文本编辑器中删除相应的 .pbxproj 文件中的相应行)。

背景:几年前,随着不同设备尺寸的大量出现,苹果公司开始使用一个预制的 UI 文件(.xib)来代替一系列静态图像作为启动屏幕。这曾经在目标 UI 的常规选项卡中公开,但由于它已经被移除了很长时间,因此您必须深入 Build Settings 选项卡中进行查找。


0

文件Images.xcassets是由Asset Catalog Creator工具重新生成的,将其删除并重新添加到项目中可以解决问题。将文件添加到Xcode项目时,引用需要正确设置。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接