Skip to content

Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager. #9639

@erwindemoel

Description

@erwindemoel

Issue Description

We have an Azure Devops pipeline, where we run our NativeScript build. In the "Build Android release apk" step, I'm now getting the following error:

Unzipping /Users/runner/.gradle/wrapper/dists/gradle-6.4-bin/aj6cyggqps6mdbpl6cfppfwqk/gradle-6.4-bin.zip to /Users/runner/.gradle/wrapper/dists/gradle-6.4-bin/aj6cyggqps6mdbpl6cfppfwqk
Set executable permissions for: /Users/runner/.gradle/wrapper/dists/gradle-6.4-bin/aj6cyggqps6mdbpl6cfppfwqk/gradle-6.4/bin/gradle

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':verifyReleaseResources'.
> Installed Build Tools revision 31.0.0 is corrupted. Remove and install again using the SDK Manager.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 25s

I've Googled on this error and found a simple solution with renaming d8.bat to dx.bat. However we can't since it's in an Azure Build pipeline.
On StackOverflow I found another solution here:
https://stackoverflow.com/questions/68387270/android-studio-error-installed-build-tools-revision-31-0-0-is-corrupted

They said: to change three places from 31 to 30: compileSdkVersion, buildToolsVersion, and targetSdkVersion

However these are nowhere in my Nativescript project.
How can I change my version from 31 to 30 in Nativescript?

Reproduction

No response

Relevant log output (if applicable)

No response

Environment

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions