I'm having a serious problem trying to create an Android CI/CD in Azure DevOps. Turns out the pipeline tries to use the latest version of BuildTools to build the apk, but the latest version (31.0.0) seems to be having problems.
I would like to force Azure to use version 30.0.3 that I have already tested is working perfectly.
Azure Log Using BuildTools 31.0.0
Local log using BuildTools 31.0.0
Local log using BuildTools 30.0.0
I'm using Ionic with cordova to generate my Android project, although cordova docs says it supports cli arguments to force build tools version.
eg.: ionic cordova run android -- --gradleArg=-P cdvBuildToolsVersion=30
It still generates in a way that will always use the most current version installed in the cordovaLib module
build.gradle [app module]
// The value for android.buildToolsVersion.
if (!project.hasProperty('cdvBuildToolsVersion')) {
cdvBuildToolsVersion = null;
}
...
compileSdkVersion cdvCompileSdkVersion
buildToolsVersion cdvBuildToolsVersion
build.gradle [cordovaLib module]
cdvCompileSdkVersion = privateHelpers.getProjectTarget()
cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools()
...
compileSdkVersion cdvCompileSdkVersion
buildToolsVersion cdvBuildToolsVersion