Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio can't start git, although actually can

Tags:

My Android Studio is complaining about

Can't start Git: /usr/bin/git

Probably the path to Git executable is not valid

although I can actually use git in android studio, and /usr/bin/git works in terminal.

How do I get rid of this false error

Here is my ~/.bash_profile

export PATH=/usr/bin/git:$PATH

like image 937
kevin0228ca Avatar asked May 05 '15 07:05

kevin0228ca


People also ask

Does git work with Android studio?

Step 4: To install Git in Android Studio, we have to build a repository on GitHub first. Step 5: Now coming back to Android Studio, click on “VCS” (Version Control Systems) and then click on “Enable Version Control Integration”. Step 6: Then on selecting a version control, click “Git” and then “Ok”.

Can not run git in IntelliJ?

go to the terminal and type git --exec-path to get your git path. then go to IntelliJ and configure it, Click browse and select your git path. select git and hit test.


1 Answers

If you're on Mac OSX, run sudo xcodebuild -license in the Terminal. It will show a wall of text. Carefully read the license ;) and keep pressing Space until you reach the end and then simply type agree and hit enter. This fixed the above error for me on Android Studio.

On some occasions even that might not fix this issue. Try running the following command in the Terminal and restart Android Studio.

sudo /usr/bin/git
like image 175
Isuru Avatar answered Oct 20 '22 15:10

Isuru