1. 程式人生 > >【Android死丟丟】Cannot run program "git.exe":CreateProcess error=2

【Android死丟丟】Cannot run program "git.exe":CreateProcess error=2

在使用Android studio從Git上check專案的時候報錯

Cannot run program “git.exe”:CreateProcess error=2

1、檢查已是否安裝GitHub For Windows,若已安裝,請看3;否則,請看2

PS的PS的PS:雙擊GitHub.application就可以安裝了。
預設安裝路徑是:

C:\Users\你的使用者名稱\AppData\Local\GitHub

git.exe的路徑是:

C:\Users\你的使用者名稱\AppData\Local\GitHub\PortableGit_c2ba306e536fdf878271f7fe636a147ff37326ad\bin

3、將git.exe的路徑新增進Path環境變數中。

右鍵此電腦->屬性->高階系統設定->環境變數->系統變數->Path

把git.exe的路徑貼上進去,末尾加上英文的逗號,就好了。注意:不要覆蓋path原有的內容。

4、重啟Android Studio。

File->New->Project from Version Control->GitHub

剩下的就不贅述了。