SDK versions, Gradle and JDK configuration

Android builds depend on a compatible combination of Flutter, the Android Gradle Plugin, Gradle, JDK, Kotlin, and Android SDK packages. Changing only one can break the build.

Inspect the supplied configuration

The inspected source declares Android Gradle Plugin 9.0.1 and Kotlin plugin 2.3.20 in android/settings.gradle.kts. The wrapper uses Gradle 9.1.0; the app sets Java/JVM target 17. Compile, target, and minimum SDK values are taken from Flutter defaults.

These values describe the source checkout. They do not substitute for a tested release environment.

Diagnose the mismatch

Run flutter doctor -v and inspect which Java installation Flutter uses. Check the Gradle wrapper configuration and the exact missing SDK or compatibility error. Review AGP 9.0 compatibility and behavior changes, including its built-in Kotlin changes, before copying configuration from an older tutorial.

Install the requested SDK components rather than lowering compileSdk to hide a missing installation. Do not add a second Kotlin plugin application without understanding the supplied Gradle setup.

Restore a known baseline

If an upgrade caused the failure, restore the release’s Android configuration and compatible Flutter SDK together. Rebuild before reapplying custom changes.

Provide the first Gradle error, Flutter version, JDK version, and relevant build-file changes when requesting help. Omit signing passwords and keystore contents.

Write Your Comment