Glide Process 'command 'git'' 以非零退出值 128 结束
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/35029768/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Glide Process 'command 'git'' finished with non-zero exit value 128
提问by michelletbs
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
我已经从 Github 下载了 Glide 并想在 Android Studio 上测试该程序。但是一旦我清理了项目,我就会遇到这个错误
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?
错误是什么意思?我使用 Gradle 进行构建。这是因为 Android Studio 上的版本问题吗?
回答by Zumbarlal Saindane
Same error occurred for me also.
我也发生了同样的错误。
In build.gradle previous code like
在 build.gradle 之前的代码中
exec {
commandLine 'git', 'describe', '--tags'
}
then I added 'cmd'
before 'git'
然后我'cmd'
之前加了'git'
and that error gone.
那个错误消失了。
below is code after adding the code
下面是添加代码后的代码
exec {
commandLine 'cmd', 'git', 'describe', '--tags'
}
回答by u6689352
exec {
commandLine "git", "submodule", "update", "--init", "--recursive"
}
Then I added cmd
before git
.
然后我cmd
之前加了git
。
and that error gone.
那个错误消失了。
exec {
commandLine "cmd","git", "submodule", "update", "--init", "--recursive"
}
回答by Khan Hadiur
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.
如果项目git
配置不正确,就会发生这种情况Android Studio
。
以前似乎没有人经历过这种情况。因为我用谷歌搜索了数千次,但解决方案不起作用。
What is just work for me:
什么对我来说只是工作:
- Solution for
Gradle Build Android Studio Project
- Clone the project from
git
. Or Upload your project togit
and cloneFresh
in empty folder of your PC. (This is for configuregit
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.
- 解决方案
Gradle Build Android Studio Project
- 从
git
. 或者将您的项目上传到您的 PC 的空文件夹中git
并克隆Fresh
。(这是为了git
正确配置,其他方式对我的项目不起作用) - 如果
.idea
存在任何文件夹,请删除。 - 作为现有
Android Studio
项目打开。 - 让它滚动。如果它需要任何依赖,请继续。
回答by younes
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"
}
回答by Greensouth
Take a look at this, it is the only answer that worked for me on OSX
看看这个,这是唯一在 OSX 上对我有用的答案