每当我向资源目录添加应用程序图标并在设备上运行时,都会出现以下错误。每个项目都会出现这种情况,即使是空白的新项目。
资产目录编译器错误 /Users/****/Documents/Test/sfdadfas/sfdadfas/Assets.xcassets: 无法为应用程序图标集写入图像数据 “AppIcon.appiconset/app-icon-iphone@2x.png”来 “/用户/ ***** / Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzesdsfsgifiloaxklokg/Build/Products/Debug-iphoneos/sfdadfas.app/AppIcon60x60@2x.png”。
但是当我在模拟器上运行时,这很好用,并且可以正确显示应用程序图标。
我在macOS High Sierra上使用Xcode 9.2(9.1有相同的错误)。
Xcode 8.3.3没有这个问题。
修改
日志完全错误,
CompileAssetCatalog /Users//Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzevlegifiloaxklokg/Build/Intermediates.noindex/ArchiveIntermediates/sfdadfas/InstallationBuildProductsLocation/Applications/sfdadfas.app sfdadfas / Assets.xcassets cd / Users / **** / Documents / Test / sfdadfas 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中:/ usr / sbin目录:/ sbin目录” /Applications/Xcode.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info / Users / **** / Library / Developer /Xcode/DerivedData/sfdadfas-cbhytlfzznzevlegifiloaxklokg/Build/Intermediates.noindex/ArchiveIntermediates/sfdadfas/IntermediateBuildFilesPath/sfdadfas.build/Release-iphoneos/sfdadfas.build/assetcatalog_dependencies --output-partial-info-plist /Users/****/Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzevlegifiloaxklokg/Build/Intermediates.noindex/ArchiveIntermediates/sfdadfas/IntermediateBuildFilesPath/sfdadfas.build/Release-iphoneos/sfdadfas .build / assetcatalog_generated_info.plist --app-icon AppIcon --compress-pngs --enable-on-demand-resources YES --sticker-pack-identifier-prefix com。*****.test22.sfdadfas.sticker-pack。 --target-device iphone --target-device ipad --minimum-deployment-target 10.3 --platform iphoneos --product-type com.apple.product-type.application --compile /Users/****/Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzevlegifiloaxklokg/Build/Intermediates.noindex/ArchiveIntermediates/sfdadfas/InstallationBuildProductsLocation/Applications/sfdadfas.app /用户/ **** /文档/测试/ sfdadfas / sfdadfas / Assets.xcassets
/ * com.apple.actool.errors * / /Users/****/Documents/Test/sfdadfas/sfdadfas/Assets.xcassets:错误: 无法为应用程序图标集写入图像数据 “AppIcon.appiconset/app-icon-iphone@2x.png”来 “/Users/****/Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzevlegifiloaxklokg/Build/Intermediates.noindex/ArchiveIntermediates/sfdadfas/InstallationBuildProductsLocation/Applications/sfdadfas.app/AppIcon60x60@2x.png”。 潜在的错误: 描述:pngcrush退出信号'6'表示“/Users/****/Documents/Test/sfdadfas/sfdadfas/Assets.xcassets/AppIcon.appiconset/app-icon-iphone@2x.png”。 错误输出:
In /Users/****/Documents/Test/sfdadfas/sfdadfas/Assets.xcassets/AppIcon.appiconset/app-icon-iphone@2x.png,
纠正libpng错误:发现IDAT太多
/ * com.apple.actool.compilation-results * / /Users/****/Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzevlegifiloaxklokg/Build/Intermediates.noindex/ArchiveIntermediates/sfdadfas/InstallationBuildProductsLocation/Applications/sfdadfas.app/Assets.car /Users/****/Library/Developer/Xcode/DerivedData/sfdadfas-cbhytlfzznzevlegifiloaxklokg/Build/Intermediates.noindex/ArchiveIntermediates/sfdadfas/IntermediateBuildFilesPath/sfdadfas.build/Release-iphoneos/sfdadfas.build/assetcatalog_generated_info.plist