美文网首页
mac OS更系统后 android studio git 报错

mac OS更系统后 android studio git 报错

作者: CoderXiaoTe | 来源:发表于2018-10-23 21:13 被阅读14次

电脑提醒更新 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也是醉了。

相关文章

网友评论

      本文标题:mac OS更系统后 android studio git 报错

      本文链接:https://www.haomeiwen.com/subject/lekzzftx.html