Cordova 129 's platforms/android folder is an ordinary Gradle 19,597 project with two modules, app (the WebView shell and your www assets) and CordovaLib (the bridge). You never edit its build scripts, but most Android build failures surface as Gradle errors, so know how Cordova runs them. Cordova requires a system-wide Gradle (since cordova-android 6.4.0), and a verbose build shows why: it runs your gradle once, only for the wrapper task, which writes gradlew pinned to the version cordova-android was tested with. Real builds go through that wrapper, so the system version (9.7.1 here) and the project version (8.14.2) need not match:
cordova create ToolCheck com.example.toolcheck ToolCheck > /dev/null
cd ToolCheck
cordova platform add android > /dev/null
cordova build android --verbose 2>&1 |
grep -E "Using Gradle|Task :wrapper|Running Gradle|BUILD SUCCESSFUL"
grep distributionUrl platforms/android/gradle/wrapper/gradle-wrapper.propertiesUsing Gradle: 8.14.2 > Task :wrapper BUILD SUCCESSFUL in 4s Running Gradle Build: .../ToolCheck/platforms/android/tools/gradlew cdvBuildDebug BUILD SUCCESSFUL in 14s distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.2-bin.zip
The versions come from platforms/android/cdv-gradle-config.json: here Gradle 8.14.2, AGP 8.10.1, Kotlin 2.1.21, minimum SDK 24, target SDK 36 and Build Tools 36.0.0. Preferences in config.xml such as android-minSdkVersion (SDK Versions) are written into it on every cordova prepare, so edit config.xml, never the JSON.