使用CocoaPods后构建失败

时间:2015-07-13 08:13:09

标签: objective-c xcode cocoapods

我第一次使用CocoaPods。安装所需的库会导致构建过程中断。

安装Podfile会发出此警告:

clang: error: no such file or directory: '/Users/aztunwin/ObjC/DenkoStation/Pods/Target Support Files/Pods-RKValueTransformers/Pods-RKValueTransformers-dummy.m'
clang: error: no input files
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 1

以下是构建错误消息:

{{1}}

1 个答案:

答案 0 :(得分:1)

第一个错误似乎是因为您最初从磁盘映像(.dmg)文件启动了Xcode 6.1,因此MacOS似乎正在寻找命令行工具。你需要重置它。

转到终端并输入:

xcode-select --switch /Applications/Xcode.app

您的/ Applications文件夹中确实找到了您的Xcode副本(我可以从第二个错误输出中看到)。使用xcode-select设置命令行工具路径后,清理项目并重新启动Xcode并尝试重新构建。