最近项目Archive的时候,到最后报错了:
搜了半天,尝试很多方法,都无解。
尝试 clean build folder 再Archive 还是报错
尝试删除DerivedData ,再Archive 还是报错
我试图尝试删除图片资源Assets.xcassets,再一次Archive的时候成功了。但是我重新创建图片资源。但是运行还是报错。
【无解】
后来发现系统版本和Xcode版本都比最新版低。
就尝试更新了系统和Xcode版本。
然后居然没好。。。。
然后 我就去图片资源去看看
发现了 icon_enter_blue@2x.heic 这样格式的图片
被同事坑了。坑。坑
替换掉图片。解决问题
CompileAssetCatalog /Users/eagleeye/Library/Developer/Xcode/DerivedData/RiskControlEnterprise-dxnopqgcspxyixhdsnhzeznktkby/Build/Intermediates.noindex/ArchiveIntermediates/RiskControlEnterprise_CS/InstallationBuildProductsLocation/Applications/RiskControlEnterprise_CS.app /Users/eagleeye/Documents/work/代码/yi_ge_feng_control/RiskControlEnterprise/RiskControlEnterprise/Media.xcassets (in target 'RiskControlEnterprise_CS' from project 'RiskControlEnterprise')
cd /Users/eagleeye/Documents/work/代码/yi_ge_feng_control/RiskControlEnterprise
/Applications/Xcode.app/Contents/Developer/usr/bin/actool --output-format human-readable-text --notices --warnings --export-dependency-info /Users/eagleeye/Library/Developer/Xcode/DerivedData/RiskControlEnterprise-dxnopqgcspxyixhdsnhzeznktkby/Build/Intermediates.noindex/ArchiveIntermediates/RiskControlEnterprise_CS/IntermediateBuildFilesPath/RiskControlEnterprise.build/Release-iphoneos/RiskControlEnterprise_CS.build/assetcatalog_dependencies --output-partial-info-plist /Users/eagleeye/Library/Developer/Xcode/DerivedData/RiskControlEnterprise-dxnopqgcspxyixhdsnhzeznktkby/Build/Intermediates.noindex/ArchiveIntermediates/RiskControlEnterprise_CS/IntermediateBuildFilesPath/RiskControlEnterprise.build/Release-iphoneos/RiskControlEnterprise_CS.build/assetcatalog_generated_info.plist --app-icon AppIconCS --launch-image LaunchImageCS --compress-pngs --enable-on-demand-resources YES --sticker-pack-identifier-prefix com.eagle.rmc.debug.sticker-pack. --development-region en --target-device iphone --minimum-deployment-target 10.0 --platform iphoneos --product-type com.apple.product-type.application --compile /Users/eagleeye/Library/Developer/Xcode/DerivedData/RiskControlEnterprise-dxnopqgcspxyixhdsnhzeznktkby/Build/Intermediates.noindex/ArchiveIntermediates/RiskControlEnterprise_CS/InstallationBuildProductsLocation/Applications/RiskControlEnterprise_CS.app /Users/eagleeye/Documents/work/代码/yi_ge_feng_control/RiskControlEnterprise/RiskControlEnterprise/Media.xcassets
2020-05-14 00:00:32.864 ibtoold[42053:165110] DEBUG: Added to environment: {
TMPDIR = "/var/folders/bw/303hxx_n5v54d38wtf4r_7k40000gn/T/A2C04F10-3A10-4F10-9AA9-FC61E0B647CF";
}
2020-05-14 00:00:40.804 IBCocoaTouchImageCatalogTool[42618:168210] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Illegal attempt to establish a relationship 'compressionType' between objects in different contexts (source = <TDSimpleArtworkRenditionSpec: 0x7fcae77a7eb0> (entity: SimpleArtworkRenditionSpec; id: 0xf10480f69de4db60 <x-coredata://FF90F6EE-C9C4-4860-BE79-8523148CB3CE/SimpleArtworkRenditionSpec/p141>; data: {
alignmentRect = "(...not nil..)";
alignmentRectString = "{{0, 0}, {0, 0}}";
allowsCompactCompression = 0;
allowsDeepmap2Compression = nil;
allowsDeepmapCompression = nil;
allowsHevcCompression = nil;
allowsMultiPassEncoding = 1;
allowsOptimalRowbytesPacking = 1;
allowsPaletteImageCompression = 0;
alphaCrop = 0;
asset = "0xf10480f697d0db72 <x-coredata://FF90F6EE-C9C4-4860-BE79-8523148CB3CE/PNGAsset/p512>";
compressionType = "0xf10480f69b64db16 <x-coredata://FF90F6EE-C9C4-4860-BE79-8523148CB3CE/ThemeCompressionType/p301>";
dateOfLastChange = "2020-05-13 16:00:36 +0000";
height = 0;
isTintable = 0;
keySpec = "0xf10480f68f1cdb62 <x-coredata://FF90F6EE-C9C4-4860-BE79-8523148CB3CE/RenditionKeySpec/p1075>";
monochrome = 0;
nonAlphaImageAreaString = nil;
opaque = 0;
originalImageSizeString = nil;
packedPointX = 0;
packedPointY = 0;
packedRenditions = "<relationship fault: 0x7fcae773adf0 'packedRenditions'>";
parentRendition = nil;
physicalSizeInMetersString = nil;
postScaleFactor = 1;
production = "0xf10480f698a8db70 <x-coredata://FF90F6EE-C9C4-4860-BE79-8523148CB3CE/NamedArtworkProduction/p478>";
properties = "<relationship fault: 0x7fcae77abf50 'properties'>";
renditionType = "0xf10480f69904db2c <x-coredata://FF90F6EE-C9C4-4860-BE79-8523148CB3CE/RenditionType/p437>";
slices = "<relationship fault: 0x7fcae7749310 'slices'>";
width = 0;
}) , destination = <TDThemeCompressionType: 0x7fcae984c7c0> (entity: ThemeCompressionType; id: 0xf10480f69f7cdb16 <x-coredata://FF90F6EE-C9C4-4860-BE79-8523148CB3CE/ThemeCompressionType/p43>; data: {
constantName = kCoreThemeCompressionTypeLossy;
displayName = Lossy;
identifier = 3;
}))'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff23c7127e __exceptionPreprocess + 350
1 libobjc.A.dylib 0x00007fff513fbb20 objc_exception_throw + 48
2 CoreData 0x00007fff2383f744 _PFManagedObject_coerceValueForKeyWithDescription + 3073
3 CoreData 0x00007fff2382077a _sharedIMPL_setvfk_core + 173
4 CoreThemeDefinition 0x00007fff3417546e -[TDSimpleArtworkRenditionSpec createCSIRepresentationWithCompression:colorSpaceID:document:] + 823
5 CoreThemeDefinition 0x00007fff3418160d __34-[TDRenditionsDistiller _distill:]_block_invoke + 117
6 CoreData 0x00007fff23836e36 developerSubmittedBlockToNSManagedObjectContextPerform + 154
7 libdispatch.dylib 0x00007fff5223f7b9 _dispatch_client_callout + 8
8 libdispatch.dylib 0x00007fff52245526 _dispatch_lane_serial_drain + 707
9 libdispatch.dylib 0x00007fff52245f5c _dispatch_lane_invoke + 388
10 libdispatch.dylib 0x00007fff5224fff9 _dispatch_workloop_worker_thread + 626
11 libsystem_pthread.dylib 0x00007fff5245f611 _pthread_wqthread + 421
12 libsystem_pthread.dylib 0x00007fff5245f3fd start_wqthread + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Command CompileAssetCatalog failed with a nonzero exit code