Cordova "Gradle version ... required" mismatch in CI
cordova-android builds with Gradle and the Android Gradle Plugin. When the runner has an older Gradle than the plugin requires, the build fails reporting the minimum supported Gradle version. Cordova can also provision its own Gradle if allowed.
What this error means
cordova build android fails with "Minimum supported Gradle version is X.Y. Current version is A.B" from the Android Gradle Plugin.
Minimum supported Gradle version is 8.0. Current version is 7.4.
Please fix the project's Gradle settings.Common causes
The runner Gradle is older than required
A globally installed older Gradle on the runner does not meet the Android Gradle Plugin minimum, so the build is rejected.
cordova-android version expects a newer Gradle
A newer cordova-android pins a newer AGP that mandates a higher Gradle, which the current toolchain does not satisfy.
How to fix it
Use a compatible Gradle version
- Install the Gradle version cordova-android requires, or let it download one.
- Avoid forcing an older global Gradle.
- Re-run the Android build.
- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: '8.7'
- run: npx cordova build androidAlign cordova-android with the toolchain
Pin a cordova-android version whose AGP and Gradle requirements match what you provision in CI.
npx cordova platform add android@13.0.0How to prevent it
- Match Gradle, AGP, and cordova-android versions deliberately.
- Let cordova provision Gradle or pin a compatible one.
- Avoid a stale global Gradle on the runner.