在Swift
使用CocoaPods
,需要安装第三方时候:pod install --no-repo-update
提示如下错误:
[!] You need at least git version 1.8.5 to use CocoaPods (Pod::Informative)
最后才知道是我的xcode.app
挪动了位置,使CocoaPods
连接不到正确的xcode.app
位置。
解决办法:
1: 打开终端
2:执行命令
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
其中:sudo xcode-select -switch (Xcode.app应用所在的文件路径)/Contents/Developer
网友评论