【问题标题】:Xcode: None of the input catalogs contained a matching app icon / launch image setXcode:没有一个输入目录包含匹配的应用程序图标/启动图像集
【发布时间】:2017-01-11 17:23:49
【问题描述】:

在尝试归档 iOS 项目时,我的 Xcode 开始出现异常。

  • 所有文件都在原来的位置
  • 我试图返回上一个提交
  • 尝试重启 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

【问题讨论】:

    标签: ios xcode build xcode8 asset-catalog


    【解决方案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项目时,需要正确设置引用。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2015-03-14
        • 2013-10-30
        • 1970-01-01
        • 2016-05-07
        • 1970-01-01
        • 2013-10-07
        • 2017-04-10
        • 2018-02-24
        相关资源
        最近更新 更多