具体提示内容
ProcessNotCreatedException: Cannot run program "/usr/local/bin/git" (in directory "/Users/wj/project"): error=2, No such file or directory
原因
设置的git路径有误
查找原因
在Android studio中的设置Preferences->Version Control->Git->Path to Git executable的路径,目前写的是【/usr/local/bin/git】,点击后面Test按钮显示错误:Cannot run program "/usr/local/bin/git": error=2, No such file or directory
解决问题
在终端上输入:whereis git
得到git所在的路径。
结果发现现在git所在的路径是:/usr/bin/git
在Preferences->Version Control->Git->Path to Git executable 设置成现在的git路径,Test测试一下,是OK的。在VersionControl里面也有了Git的日志。成功解决!