Page 1 of 1

使用Android Studio 2021.3.1软件,编译app_android时出错

Posted: Tue Nov 14, 2023 1:12 pm
by fanyhe1
错误信息:Gradle sync failed: Process 'command 'git'' finished with non-zero exit value 128 (536 ms)
问题指向文件build.gradle的下面代码:
def getGitHash = { ->
def stdout = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = stdout

}
return stdout.toString().trim()
}