xcode Cocoa:命令 /usr/bin/ditto 失败,退出代码为 1

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/38561466/
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 09:04:35  来源:igfitidea点击:

Cocoa: Command /usr/bin/ditto failed with exit code 1

iosobjective-cxcodemacoscocoa

提问by Vikas Bansal

I am trying to build my project but it is not getting build.

我正在尝试构建我的项目,但它没有构建。

I am getting the following error:

我收到以下错误:

Command /usr/bin/ditto failed with exit code 1

enter image description here

在此处输入图片说明

I have cleaned my project but still is issue is persisting.

我已经清理了我的项目,但问题仍然存在。

Xcode Details:

Xcode 详细信息:

enter image description here

在此处输入图片说明

EDIT Solution tried

尝试过编辑解决方案

I went to

我去了

~/Library/Developer/Xcode/DerivedData

and deleted everything inside the folder then went back to the Xcode and tried to build the solution. Getting the same error back

并删除文件夹中的所有内容,然后返回 Xcode 并尝试构建解决方案。返回相同的错误

Command /usr/bin/ditto failed with exit code 1

回答by Sangram Shivankar

clean your project and see whether it help or not

清理你的项目,看看它是否有帮助

Command+ Shift+ K

Command+ Shift+K

or

或者

Product > Clean

产品 > 清洁

Or check this link it may helps you: http://codica.pl/2015/12/25/taming-swift-compiler-bugs/

或者检查这个链接它可能对你有帮助:http: //codica.pl/2015/12/25/taming-swift-compiler-bugs/

回答by AlbertoBay

For Mac OS Sierra, this work for me:

对于 Mac OS Sierra,这对我有用:

cd /Users/YOUR_USER_NAME/Library/Developer/Xcode/DerivedData

cd /Users/YOUR_USER_NAME/Library/Developer/Xcode/DerivedData

then

然后

xattr -dr com.apple.FinderInfo *

xattr -dr com.apple.FinderInfo *

and then rebuild your project..

然后重建你的项目..

and fix the error!

并修复错误!

回答by Kyle KIM

All of sudden, It happens to my Mac app project today in Xcode 7.3.1.

突然之间,它发生在我今天在 Xcode 7.3.1 中的 Mac 应用程序项目中。

What I did : Clean >Clean build folder > Quit Xcode >Open Finder then go to

我做了什么:清理>清理构建文件夹>退出Xcode>打开Finder然后去

~/Library/Developer/Xcode/DerivedData

〜/图书馆/开发人员/Xcode/DerivedData

then deleated everything inside >Open Xcode >Build >Run

然后删除里面的所有内容>打开Xcode>构建>运行

I think this is happening when something is wrong adding a file into Xcode. I have not encountered since readding myApp.help file without the option 'Destination: Copy items if needed'.

我认为这是在将文件添加到 Xcode 时出现问题时发生的。自从阅读 myApp.help 文件后,我没有遇到没有“目的地:如果需要复制项目”选项的情况。

回答by Rainer Niemann

Look at the error messages and find out which files are affected. Delete these files (remove references) and then add them again to your project's target. It should work now.

查看错误消息并找出受影响的文件。删除这些文件(删除引用),然后将它们再次添加到项目的目标中。它现在应该可以工作了。