Xcode error : Distill failed for unknown reasons

余生长醉 提交于 2019-11-30 10:44:15
Balram Tiwari

You might have migrated from a normal project to use an image.catalog. So you can definitely try to copy the bundle resource like launch images. It is so because migrating to an asset catalog for icons and launch images apparently doesn't always add itself to the target automatically.

You can find more on this here & here.

I hope that helps.

I found that my png was a psd file. I deleted the file and recreated a new png and everything was fine.

grgr

I had the same case as Karsten, one of the image was psd. I opened the file in Mac Preview app and tried to export and found that it was a PSD instead of .png

For me, I used with Xcode beta but I didn't upgrade my MAC OSX beta to the latest version as Apple recommends.

.

In my case, one of the image asset is corrupted and caused this issue.

Corrupted image usually with 0 (zero) size. so, we can use terminal to find out which one:

find ./your_directory_path -size 0 -print

Dániel László Kovács

For me the solution was to do the following (given I had no .psd as .png, etc.).

Go to the General tab of the Target in Xcode project settings, roll down to the "App Icons and Launch Images" section, and change the value of "App Icons Source" from "AppIcon" to "Don't use asset catalogs"

Note: this way the project builds and deploys on iOS, and later you can change the AppIcon settings back, adding your custom AppIcon (with proper file-format and file-extension).

I was prompted this error and I inspect error logs.

PrefixIcons.xcassets/PrefixButtonBackground.imageset/PrefixButtonBackground.png
/* com.apple.actool.errors */
: error: Distill failed for unknown reasons.

The reason was.

I have mistakenly added same image for 1x and 2x sizes for above given image.

Might be helpful to someone.

it happen for me with xcode 7.3 when i was replace an insert and image with the same name in the folder (in finder screen)

so i just rename remove the image form assets and insert it gain with a different name clean + build and it works fine

Update or ensure minimum version is: Mac OS CATALINA BETA 10.15 beta (19A536g) and Xcode Version 11.0 beta 5 (11M382q)

After talking with an apple engineer, the problem was solved by updating MAC OS and Xcode, specifically to these versions I assure that the problem was solve.

In my case it was a PSD file saved as PNG. You can search for wrong files by running following command in Terminal in your assets directory:

grep -rL "PNG" --include \*.png . 

Xcode 11: I just removed Assets.xcassets and re-added to target, and it worked.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!