xcode 资产目录编译错误 - TDDIstiller 实例只能被蒸馏一次

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27831785/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 06:27:58  来源:igfitidea点击:

Asset Catalog Compile Error - TDDIstiller instance can only be distilled only one time

iosobjective-cxcodeimage

提问by Merkidemis

So, I have an app that I am building in Xcode, and things have been going pretty well for a while. However, suddenly I am getting the error:

所以,我有一个正在 Xcode 中构建的应用程序,并且一段时间以来一直进展顺利。但是,突然间我收到错误消息:

Images.xcassets: error: ERROR: Each TDDistiller instance can be distilled only one time!

So, two problems:

所以,有两个问题:

1)I have no idea what that means, and neither does Google, Bing, or Yahoo, apparently.

1)我不知道这意味着什么,显然谷歌、必应或雅虎也不知道。

2)I have no idea how to fix it. I haven't changed my asset catalog in months, so I don't know what could have introduced this fault.

2)我不知道如何解决它。我已经几个月没有更改我的资产目录,所以我不知道是什么导致了这个故障。

Here is the error log for the build:

这是构建的错误日志:

2015-01-07 19:41:57.348 IBCocoaTouchImageCatalogTool[1226:17469] 
BOMStorage BOMStorageNewWithOptionsAndSys(const char *, 
CFDictionaryRef, BomSys *) can't open: 
'/Users/user/Library/Developer/Xcode/DerivedData/Videographer-
eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-
iphonesimulator/Videographer.app/Assets.car' Permission denied  2015-
01-07 19:41:57.349 IBCocoaTouchImageCatalogTool[1226:17469] Error: 
unable to create storage file 
/Users/user/Library/Developer/Xcode/DerivedData/Videographer-
eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-
iphonesimulator/Videographer.app/Assets.car error 'No such file or 
directory' /* com.apple.actool.errors */ 
/Users/user/Documents/Videographer/Videographer/Images.xcassets: 
error: ERROR: Each TDDistiller instance can be distilled only one 
time! /* com.apple.actool.document.notices */ 

/Users/user/Documents/Videographer/Videographer/Images.xcassets:./AppIcon.appiconset/[iphone][57x57][1x]: notice: 57x57 app icons only apply to iPhone apps targeting releases of iOS prior to 7.0 /Users/user/Documents/Videographer/Videographer/Images.xcassets:./AppIcon.appiconset/[iphone][57x57][2x]: notice: 57x57@2x app icons only apply to iPhone apps targeting releases of iOS prior to 7.0 /Users/user/Documents/Videographer/Videographer/Images.xcassets:./AppIcon.appiconset/[ipad][50x50][1x]: notice: 50x50 iPad spotlight icons only apply to iPad apps targeting releases of iOS prior to 7.0 /Users/user/Documents/Videographer/Videographer/Images.xcassets:./AppIcon.appiconset/[ipad][50x50][2x]: notice: 50x50 iPad spotlight icons only apply to iPad apps targeting releases of iOS prior to 7.0 /Users/user/Documents/Videographer/Videographer/Images.xcassets:./AppIcon.appiconset/[ipad][72x72][1x]: notice: 72x72 app icons only apply to iPad apps targeting releases of iOS prior to 7.0 /Users/user/Documents/Videographer/Videographer/Images.xcassets:./AppIcon.appiconset/[ipad][72x72][2x]: notice: 72x72@2x app icons only apply to iPad apps targeting releases of iOS prior to 7.0 /* com.apple.actool.compilation-results *//Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon29x29.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/[email protected] /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/[email protected] /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon57x57.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/[email protected] /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/[email protected] /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon40x40~ipad.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon50x50~ipad.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon50x50@2x~ipad.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon72x72~ipad.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon72x72@2x~ipad.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon76x76~ipad.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon76x76@2x~ipad.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/Assets.car /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Intermediates/Videographer.build/Debug-iphonesimulator/Videographer.build/assetcatalog_generated_info.plist

/Users/user/Documents/Videographer/Videographer/Images.xcassets:./AppIcon.appiconset/[iphone][57x57][1x]: notice: 57x57 app icons only apply to iPhone apps targeting releases of iOS prior to 7.0 /Users/user/Documents/Videographer/Videographer/Images.xcassets:./AppIcon.appiconset/[iphone][57x57][2x]: notice: 57x57@2x app icons only apply to iPhone apps targeting releases of iOS prior to 7.0 /Users/user/Documents/Videographer/Videographer/Images.xcassets:./AppIcon.appiconset/[ipad][50x50][1x]: notice: 50x50 iPad spotlight icons only apply to iPad apps targeting releases of iOS prior to 7.0 /Users/user/Documents/Videographer/Videographer/Images.xcassets:./AppIcon.appiconset/[ipad][50x50][2x]: notice: 50x50 iPad spotlight icons only apply to iPad apps targeting releases of iOS prior to 7.0 /Users/user/Documents/Videographer/Videographer/Images.xcassets:./AppIcon.appiconset/[ipad][72x72][1x]: notice: 72x72 app icons only apply to iPad apps targeting releases of iOS prior to 7.0 /Users/user/Documents/Videographer/Videographer/Images.xcassets:./AppIcon.appiconset/[ipad][72x72][2x]: notice: 72x72@2x app icons only apply to iPad apps targeting releases of iOS prior to 7.0 /* com.apple.actool.compilation-results *//Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon29x29.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/[email protected] /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/[email protected] /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon57x57.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/[email protected] /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/[email protected] /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon40x40~ipad.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon50x50~ipad.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon50x50@2x~ipad.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon72x72~ipad.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon72x72@2x~ipad.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon76x76~ipad.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/AppIcon76x76@2x~ipad.png /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-iphonesimulator/Videographer.app/Assets.car /Users/user/Library/Developer/Xcode/DerivedData/Videographer-eubeafyfmzewucdlcmfhmdsusjng/Build/Intermediates/Videographer.build/Debug-iphonesimulator/Videographer.build/assetcatalog_generated_info.plist

Any ideas? I am in Xcode 6.1.1 working on a project targeting iOS 8.1.

有任何想法吗?我在 Xcode 6.1.1 中致力于一个针对 iOS 8.1 的项目。

回答by Merkidemis

Clearing the DerivedData folder for the project eliminated the error for me.

清除项目的 DerivedData 文件夹消除了我的错误。

回答by Adil Hussain

Quitting Xcode, quitting Simulator, re-opening Xcode and re-running the build afresh has worked for me. No idea though what this error is all about!

退出 Xcode,退出模拟器,重新打开 Xcode 并重新运行构建对我有用。不知道这个错误是怎么回事!

回答by rogermushroom

In my case something, probably to do with CocoaPod, was causing my Builddirectory to be created with a lowercase build. The Distiller was then looking for the Asset.carfile in the uppercase Builddirectory as you can see from this part of the log

在我的情况下,可能与 CocoaPod 有关的某些事情导致我的Build目录被创建为小写build. Distiller 然后在大写目录中寻找Asset.car文件,Build正如您从日志的这一部分所看到的

/Users/user/Library/Developer/Xcode/DerivedData/Videographer-
eubeafyfmzewucdlcmfhmdsusjng/Build/Products/Debug-
iphonesimulator/Videographer.app/Assets.car error 'No such file or 
directory' 

And not finding it. By manually renaming the builddirectory to BuildI was able to resolve this error. However, I assume this is only a temporary fix as whatever set the directory to buildprobably still exists.

而且没找到。通过手动将build目录重命名为Build我能够解决此错误。但是,我认为这只是一个临时修复,因为将目录设置为build可能仍然存在。

回答by wensnj

Uninstalling Xcode9 and reinstalling it

卸载Xcode9并重新安装

回答by user2888102

Xcode 9.4 now and still this problem. After several attempts, deleting all the content of the DerivedData folder worked for me following this sequence:

Xcode 9.4 现在仍然是这个问题。经过多次尝试,按照以下顺序删除 DerivedData 文件夹的所有内容对我有用:

  1. /Product/Clean menu image product clean

  2. Xcode/Preferences..Locations. Open Derived Data in finder (with the arrow) click the arrow after the derivedData folder prompt

  1. /产品/清洁 菜单图像产品清洁

  2. Xcode/首选项..位置。在 finder 中打开派生数据(带箭头) 单击derivativeData文件夹提示后的箭头

3.Close Xcode.

3.关闭 Xcode

4.Delete all content of the derivedData folder (it's a cache).

4.删除derivativeData文件夹的所有内容(它是一个缓存)。

5.Empty trash.

5.清空垃圾。

6.Open Xcode and run project.

6.打开Xcode并运行项目。

Good luck!

祝你好运!

回答by Lehlohonolo_Isaac

The most simple way to solve this is to remove all the DerivedData using this command:

解决此问题的最简单方法是使用以下命令删除所有 DerivedData:

    rm -rf ~/Library/Developer/Xcode/DerivedData

The above command really worked for me.

上面的命令真的对我有用。

回答by Gurjinder Singh

I tried above all solutions but in vain. So the following worked for me.

我尝试了所有解决方案,但徒劳无功。所以以下对我有用。

1.In XCode Go to File -> Project settings

1.在XCode中转到文件->项目设置

2.Click the Advanced button

2.点击高级按钮

3.Select "Custom" and select "Relative to Workspace" in the pull down

3.选择“自定义”,在下拉菜单中选择“相对于工作区”

4.Set "Build/Products" in Products field if not set in my case there was other value. Then click on Done.

4.如果在我的情况下没有设置,则在产品字段中设置“构建/产品”还有其他值。然后点击完成。

enter image description here

在此处输入图片说明

回答by Jonathan Cabrera

No need to clear DerivedData folder. Product > Clean Build Folderseems to be enough in this case.

无需清除 DerivedData 文件夹。在这种情况下,Product > Clean Build Folder似乎就足够了。

回答by DivideByZer0

I tried everything here, including uninstalling XCode to varying levels of completeness. The only thing that fixed this for me was creating a new project from scratch, and re-adding all my files and settings.

我在这里尝试了所有方法,包括将 XCode 卸载到不同程度的完整性。唯一为我解决这个问题的是从头开始创建一个新项目,并重新添加我的所有文件和设置。

(But you see, it's actually better that way, it Just Works! Why would you ever want to run a project in XCode anyway? Besides, if you have an old project, this is just Apple's way of making sure you're staying up to date. Imagine what kind of bigger problems you'd have if they didn't do this! ;)

(但是你看,那样实际上更好,它就是有效的!你为什么要在 XCode 中运行一个项目呢?此外,如果你有一个旧项目,这只是 Apple 确保你熬夜的方式到目前为止。想象一下,如果他们不这样做,你会遇到什么样的更大的问题!;)

回答by Hsm

Thanks to zode64's answer. I do not use cocoaPod, in my case I have problem with my product name.

感谢zode64的回答。我不使用 cocoaPod,就我而言,我的产品名称有问题。

Check this solution. Editing project.pbxproj fixed my problem.

检查此解决方案。编辑 project.pbxproj 解决了我的问题。