patrick2590
patrick2590

Reputation: 11

Android SDK Build Tools on Azure DevOps Pipelines

I'm having a serious problem trying to create an Android CI/CD in Azure DevOps. My application is an Android application with Cordova.

When I build that in Azure DevOps my pipeline has a error message:

Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.

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

How can I solve this problem?

Upvotes: 1

Views: 2185

Answers (2)

Syed Kalam
Syed Kalam

Reputation: 11

The sdk error for version 31.0.0 happens when you try cordova android 10.0.0 or below version

Pls run the below mentioned commands:-

cordova platform rm android cordova platform add [email protected] cordova build android

Also you may check the release notes for using cordova 10.1.0 ( no whitelist)

Upvotes: 1

Fairy Xu
Fairy Xu

Reputation: 568

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

It seems that this is the known issue in Android Build tool version 31.0.0.

For workarounds, you can use the lower version of the build tool.

In Azure DevOps Pipeline, you can uninstall the Build Tool version with the following script:

steps:
- script: '$ANDROID_HOME/tools/bin/sdkmanager --uninstall ''build-tools;31.0.0'''
  displayName: 'Command Line Script'

Or you can define the buildToolsVersion to 30.0.3 in your project.

For more detailed info, you can refer to this ticket: Android Studio error “Installed Build Tools revision 31.0.0 is corrupted”

Upvotes: 1

Related Questions