Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Glide Process 'command 'git'' finished with non-zero exit value 128

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?

like image 363
michelletbs Avatar asked Jan 27 '16 05:01

michelletbs


4 Answers

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'

    }
like image 103
Zumbarlal Saindane Avatar answered Nov 20 '22 00:11

Zumbarlal Saindane


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"
}
like image 37
陈利津 Avatar answered Nov 20 '22 00:11

陈利津


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:

  • Solution for Gradle Build Android Studio Project
  • Clone the project from 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)
  • Delete if any .idea folder exists.
  • Open as existing Android Studio project.
  • Let it roll. If it require any dependency, continue with that.
like image 3
Khan Hadiur Avatar answered Nov 20 '22 01:11

Khan Hadiur


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"
}
like image 2
younes Avatar answered Nov 20 '22 00:11

younes