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

Moderator: ESP_ZT

fanyhe1
Posts: 1
Joined: Tue Nov 14, 2023 1:04 pm

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

Postby fanyhe1 » Tue Nov 14, 2023 1:12 pm

错误信息: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()
}

Who is online

Users browsing this forum: No registered users and 13 guests