準(zhǔn)備查看線上bug的時(shí)候逗物,彈出報(bào)錯(cuò)提示搬卒,如下
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 seeman xcode-select
)
很明顯是說/Applications/Xcode.app/Contents/Developer
這個(gè)路徑出錯(cuò),然后就想到自己在安裝的時(shí)候改過xcode默認(rèn)的名字敬察,因此直接修改一次路徑就完事了
sudo xcode-select -switch /Applications/Xcode\ 7.3.app/Contents/Developer
我的xcode重新命名為xcode 7.3
,命令中xcode后面要跟一個(gè)'',表示后面的是空格跟xcode是一體的
2017/11/6 補(bǔ)充一種需要執(zhí)行命令的情況
在運(yùn)行報(bào)錯(cuò)尔当,出現(xiàn)的情況與上面的一致
pod install
報(bào)錯(cuò)日志:
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:129:in `verify_minimum_git_version!': [!] You need at least git version 1.8.5 to use CocoaPods (Pod::Informative)
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/lib/cocoapods/command.rb:49:in `run'
from /Library/Ruby/Gems/2.3.0/gems/cocoapods-1.3.1/bin/pod:55:in `<top (required)>'
from /usr/local/bin/pod:22:in `load'
from /usr/local/bin/pod:22:in `<main>'