最近項目Archive的時候刁俭,到最后報錯了:
搜了半天窜管,嘗試很多方法散劫,都無解。
嘗試 clean build folder 再Archive 還是報錯
嘗試刪除DerivedData 幕帆,再Archive 還是報錯
我試圖嘗試刪除圖片資源Assets.xcassets获搏,再一次Archive的時候成功了。但是我重新創(chuàng)建圖片資源失乾。但是運行還是報錯常熙。
【無解】
后來發(fā)現(xiàn)系統(tǒng)版本和Xcode版本都比最新版低。
就嘗試更新了系統(tǒng)和Xcode版本碱茁。
然后居然沒好裸卫。。纽竣。墓贿。
然后 我就去圖片資源去看看
發(fā)現(xiàn)了 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