I have downloaded Glide from Github and wanted to test the program on Android studio. But once i Clean the project, i have this error
Information:Gradle tasks [clean]
fatal: Not a git repository (or any of the parent directories): .git
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred evaluating settings 'glide-master'.
> Process 'command 'git'' finished with non-zero exit value 128
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Information:BUILD FAILED
Information:Total time: 0.28 secs
Error:fatal: Not a git repository (or any of the parent directories): .git
FAILURE: Build failed with an exception.
* Where:
Settings file '/Users/MyComputer/Downloads/glide-master/settings.gradle' line: 1
* What went wrong:
A problem occurred evaluating settings 'glide-master'.
> Process 'command 'git'' finished with non-zero exit value 128
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Information:1 error
Information:0 warnings
Information:See complete output in console
what does the error mean? I have build using Gradle.it is because of version problem on Android studio?
Same error occurred for me also.
In build.gradle previous code like
exec {
commandLine 'git', 'describe', '--tags'
}
then I added 'cmd'
before 'git'
and that error gone.
below is code after adding the code
exec {
commandLine 'cmd', 'git', 'describe', '--tags'
}
exec {
commandLine "git", "submodule", "update", "--init", "--recursive"
}
Then I added cmd
before git
.
and that error gone.
exec {
commandLine "cmd","git", "submodule", "update", "--init", "--recursive"
}
This happen if git
not configured properly with the Android Studio
project.
And nobody seems experienced this before. Because I google thousand times and solutions not work.
What is just work for me:
Gradle Build Android Studio Project
git
. Or Upload your project to git
and clone Fresh
in empty folder of your PC. (This is for configure git
properly, other way did not work properly to my project).idea
folder exists.Android Studio
project.new ByteArrayOutputStream().withStream { os ->
def result = exec {
executable = 'git'
args = ['log', '-1', '--pretty=format:%ct']
standardOutput = os
}
return os.toString() + "000"
}
Change to the following code
new ByteArrayOutputStream().withStream { os ->
def result = exec {
executable = 'cmd'
args = ['log', '-1', '--pretty=format:%ct']
standardOutput = os
}
return os.toString() + "000"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With