AGP 9.0 Upgrade Hits Three Breaking Changes: Built-in Kotlin, Gradle 9.5, and JVM 11
AGP 9.0’s built-in Kotlin is the biggest behavioral shift since the plugin DSL itself. Teams that skip the migration steps will hit hard build failures on the first sync, and the required Gradle 9.5 bump means CI pipelines and wrapper scripts need updating in lockstep.
AGP 9.0 bundles its own Kotlin compiler, so applying the kotlin-android plugin now throws a duplicate-extension error. The fix is to strip the plugin declaration from both module and project build scripts, and to delete any stale Kotlin plugin references from the version catalog. Gradle 8.11.1 is too old for AGP 9.3.1; the wrapper must point to Gradle 9.5.0 or later.
The Kotlin DSL for JVM target also changed. The old `kotlinOptions { jvmTarget = "1.8" }` block is unresolved under the new built-in Kotlin support and must be replaced with `kotlin { compilerOptions { jvmTarget.set(JvmTarget.JVM_11) } }`. Java compatibility flags move from VERSION_1_8 to VERSION_11 to match.
A stray import of `org.jetbrains.kotlin.storage.CacheResetOnProcessCanceled.enabled` — likely left over from an earlier IDE autocomplete — also breaks the build and needs to be removed. After these three changes, the project builds and runs without further issues.
The built-in Kotlin change eliminates a long-standing source of version skew between the Kotlin plugin and AGP, but it also means the Kotlin version is now effectively locked to whatever AGP ships.
Many projects still targeting JVM 1.8 will need to validate that their dependencies and bytecode tooling handle JVM 11 class files, since the upgrade forces the jump in one step.