mic*_*tbs 8 git android gradle android-glide
我已经从 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
Run Code Online (Sandbox Code Playgroud)
错误是什么意思?我使用 Gradle 进行构建。这是因为 Android Studio 上的版本问题吗?
zum*_*ums 11
我也发生了同样的错误。
在 build.gradle 之前的代码中
exec {
commandLine 'git', 'describe', '--tags'
}
Run Code Online (Sandbox Code Playgroud)
然后我'cmd'之前加了'git'
那个错误消失了。
下面是添加代码后的代码
exec {
commandLine 'cmd', 'git', 'describe', '--tags'
}
Run Code Online (Sandbox Code Playgroud)
小智 4
如果git项目配置不正确,就会发生这种情况Android Studio。
以前似乎没有人经历过这种情况。因为我用谷歌搜索了数千次,但解决方案不起作用。
什么对我来说只是工作:
Gradle Build Android Studio Projectgit。或者将您的项目上传到PC 的空文件夹中git并克隆。Fresh(这是为了git正确配置,其他方式对我的项目无法正常工作).idea如果存在任何文件夹,请删除。Android Studio。