Glide Process 'command 'git'' 以非零退出值 128 完成

新手上路,请多包涵

我已经从 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

错误是什么意思?我已经使用 Gradle 构建了。这是因为 Android studio 上的版本问题吗?

原文由 michelletbs 发布,翻译遵循 CC BY-SA 4.0 许可协议

阅读 2.6k
1 个回答

我也发生了同样的错误。

在 build.gradle 之前的代码中

exec {
        commandLine 'git', 'describe', '--tags'
    }

然后我在 'cmd' 之前添加了--- 'git'

那个错误消失了。

下面是添加代码后的代码

exec {
        commandLine 'cmd', 'git', 'describe', '--tags'

    }

原文由 Zumbarlal Saindane 发布,翻译遵循 CC BY-SA 3.0 许可协议

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题