android studio - bug - git - Xcode Command Line Tools

昨天下午更新了下mac系统到版本10.11.3(15D21)后
打开Android studio的时候出现了一个bug - 配置的git 出问题了

问题描述:
打开android studio的配置

android studio - bug - git - Xcode Command Line Tools_第1张图片

确认Path to Git executable 无误,点击Test按钮,
提示如下信息:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

在网上经常漫长查找,解决方案如下:

参考:
change xcrun developer path for Android Studio
最佳答案的描述:
I ran into the same problem, however with svn. I found that by installing El Capitan, Xcode was “uninstalled”. I reinstalled Xcode from the App Store and then reinstalled Xcode Command Line Tools via Terminal with

xcode-select –install

After installation, my /Library/Developer/CommandLineTools/usr/bin directory reappeared and svn started working again.

我把xcode重新安装了一遍,重新点击Test按钮,提示成功!

至此,文章结束,希望此文能帮助到你,如果对此文有不同见解,欢迎直接评论!

你可能感兴趣的:(android studio - bug - git - Xcode Command Line Tools)