cocoapods与Xcode中的坑
2016-12-09 本文已影响64人
岳阳_
执行pod install失败,错误提示:
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist, use `xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools (or see `man xcode-select`)
原因:上述问题是由于Xcode的路径未选择,或者路径错误导致的。
如果你在命令行中执行过这行代码以后:
sudo xcode-select -switch /Applications/Xcode.app
出现的上述问题,那你更需要继续读下去,因为这肯定可以解决你的问题。
这种情况大多发生在刚刚更新了cocoa pods 或者电脑中存在两个Xcode
解决方法:
运行Xcode

进入xcode偏好设置。

选择Locations,将Command Line Tools 进行选择,然后重新执行pod install即可。