今天更新了mac系統,然后就踩了這個坑。
啟動AndroidStudio 右上角提示:
can't start git: /usr/bin/git probably the path to git executable is not valid . `fix it`.
- 1
- 2
點擊
fix it
后 點擊最上邊路徑地址后邊的test提示:
errors while executing git -- version. exitCode=1 errors: xcrun: error : invalid active developer path(/library/developer/commandlinetools),missing xcrun at: /library/developer/commandlinetools.usr/bin/xcrun
- 1
- 2
- 3
找了一圈。。很多開發者都遇到過這問題。據說蘋果每個版本的更新都會有這樣的問題,原因是每次安裝新的更新后,Xcode都被卸載了。。。。不扯別的說解決方案。
通過終端重新安裝的Xcode命令行工具使用(其實這里安裝的是Command Line Tools,Command Line
Tools是在Xcode中的一款工具)
xcode-select --install