电脑提醒更新 mac mojoba系统好多天了,今天终于打算跟新了下,更新后打开 android studio发现 git报错了,一脸懵逼:
==can't start git:usr/bin/git
probably the path to git executable is not valid==
根据网上的方法命令行中输入 sudo /usr/bin/git命令后,果然报了预期的错误
==xcrun: error: active developer path ("/Volumes/Xcode/Xcode.app/Contents/Developer") does not exist, use xcode-select to change==
最后输入 xcode-select --install安装了一个 Command Line Tools(Xcode中的一款工具,可以在命令行中运行C程序),完美解决了问题。
如果还不行可以试试下面这个命令:
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
ps: android开发安xcode开发工具才能用git也是醉了。
网友评论