JakeWharton/u2020

Gradle build failed

Closed this issue · 3 comments

Error:(45) A problem occurred evaluating root project 'u2020-master'.

Cannot run program "git" (in directory "D:\Android\u2020-master"): CreateProcess error=2, The system cannot find the file specified

occurs at this line:
def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()

If you don't have Git installed on your machine then the failure is correct. Since the SHA of the latest commit is included in the UI, we require it to be present. You can disable it locally by changing that line to an empty string or dummy value, but for the purposes of the app and this repo I'd like to keep the requirement.

Error(43.0)A problem occurred evaluating root project 'u2020-master'.
CreateProcess error=2,The system cannot find the file specified.
occurs at this line:
def gitSha = 'git rev-parse --short HEAD'.execute([], project.rootDir).text.trim()
But ,i have installed Git for Window 7

Git needs to be in the windows PATH env variable.
Can you use git from the command line inside the project directory?