错误:命令 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang 失败,退出代码为 1
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26810628/
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
ERROR: Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
提问by origds
I am developing an app for iPhone and iPad.
我正在为 iPhone 和 iPad 开发一个应用程序。
Suddenly I can't run my project because of this error:
由于此错误,我突然无法运行我的项目:
clang: error: no such file or directory: '/Users/AkdemiaMacBookAir/Developer/iOS/ios-akdemia/ios-akdemia/ios-akdemia-Prefix.pch'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1
I was looking for in Stack Overflow and I actually checked out that my Prefix Header is correct.
我在 Stack Overflow 中寻找,实际上我检查了我的 Prefix Header 是否正确。
And here is the file:
这是文件:
I don't understand why xcode try to compile the pch from this path '/Users/AkdemiaMacBookAir/Developer/iOS/ios-akdemia/ios-akdemia/ios-akdemia-Prefix.pch' if I never told it that.
我不明白为什么 xcode 尝试从这个路径 '/Users/AkdemiaMacBookAir/Developer/iOS/ios-akdemia/ios-akdemia/ios-akdemia-Prefix.pch' 编译 pch,如果我从来没有告诉它的话。
回答by jalagrange
This guy fixed it:
这个人修复了它:
http://www.buzztouch.com/forum/thread.php?tid=F42D8239A330C321132944A¤tPage=3
http://www.buzztouch.com/forum/thread.php?tid=F42D8239A330C321132944A¤tPage=3
This was his answer:
这是他的回答:
Click on the name of your project on the list of files/folders on the left in Xcode (at the very top of the list). Look at the "Targets" section on the left-hand side of the window to the right. Likely, there's two listed with the second being a "test" item. Right-click on that item and select "delete". Then try to run the project again. See screenshot below for a visual cue.
在 Xcode 左侧的文件/文件夹列表中单击您的项目名称(在列表的最顶部)。查看右侧窗口左侧的“目标”部分。可能列出了两个,第二个是“测试”项目。右键单击该项目并选择“删除”。然后再次尝试运行该项目。有关视觉提示,请参见下面的屏幕截图。