Repository navigation
Description
Fully supports means that developers can be on AGP 9 and opted into AGP 9 features/breaking changes. This issue will be complete once the flutter team does work to enable app and plugin developers to upgrade to AGP 9 and to opt-in to AGP 9 Built-in Kotlin and the AGP new DSL.
We audited AGP 9 for Flutter before AGP 9 release: #175688.
These were the original steps taken:
- [AGP 9] Added Flutter Errors for built-in kotlin and newDsl #179765
- Added Docs for AGP 9 Migration website#12825
- [AGP 9] Fix-Forward Website URL #180018
However, we later found that all Flutter plugins in the Android project must also migrate to Built-in Kotlin to avoid build failures. Normally, we would log helpful Flutter errors directing developers to setup guides when builds fail. However, since unmigrated plugins block builds, we extended the required Built-in Kotlin migration timeline by supporting both migrated and unmigrated states. By supporting both states, we can warn developers of the requirement and urge plugin authors to complete their migration. Without this broad support, app developers would be blocked because migrating plugins is only actionable by the plugin authors.
Note: Because AGP 9 had already launched before we realized all Flutter plugins required migration to Built-in Kotlin, we had to advise developers against adopting AGP 9 until we could support all migration states. We communicated this guidance through Flutter tooling error logs here, blog posts here, and Youtube shorts here.
Below is the updated approach/solution taken to fully support AGP 9.
Flutter works on AGP 9 (General/Simpler Breaking Changes)
These are breaking changes that are completely actionable by the Flutter team. There is no need for apps to opt-in or out of any features.
Flutter works on AGP 9 (opted out of breaking changes)
Built-in Kotlin
- [AGP 9] Disable Built-in Kotlin By Default #183910
- [AGP 9] Support All Built-in Kotlin Migration States in FGP #183909
- [AGP 9] Ensure Warnings Do Not Log When AGP Is Below 9 #188373
newDsl
Flutter works on AGP 9 (opted into breaking changes)
Built-in Kotlin
- [AGP 9] Add Support To Enable Built-in Kotlin #187712
- Force devs to opt-in to built-in Kotlin in 3.50 #189235
newDsl
- ☂ Migrate Flutter Android Gradle Plugin to the AGP "newDsl" #180137
- Use Migrator Tool to Automatically Opt-in to newDsl in 3.50 #189236
Testing
AGP 9.x is fully validated in CI across the Flutter release support window, covering both opt-in/opt-out states for Built-in Kotlin alongside the applicable new DSL configurations. Because of this, the new DSL is tested uniformly, where all test apps are either strictly opted in or strictly opted out.
- ☔ [AGP 9] AGP 9.x Fully Tests Built-in Kotlin in CI #189221
- ☔ [AGP 9] AGP 9.x Fully Tests newDsl in CI #189407
Depedency Management/Version Windowing For Each Flutter Release (where AGP 9+ is possible)
- ☔ AGP 9.x Work For Flutter 3.44 #189402
- ☔ AGP 9.x Work For Flutter 3.47 #189384
- ☔ AGP 9.x Work for Flutter 3.50 #189230
Tracking Ecosystem Migration to Built-in Kotlin
Documentation
- Add Docs Warning Plugins are not supported in AGP 9 website#13015
- Added Docs for AGP 9 Migration website#12825
- Added Docs for AGP 9 Migration website#12825
- Add
/go/android-built-in-kotlin-supportdesign doc redirect website#13194 - Support AGP’s Built-in Kotlin For the Ecosystem Design Doc #183861
Activity
Added Stronger Warning Against Using AGP 9 (#13039)
[AGP 9] Added Warning Against Updating to AGP 9 (#181977)
[AGP 9] Added Warning Against Updating to AGP 9 (flutter#181977)
[AGP 9] Added Warning Against Updating to AGP 9 (flutter#181977)
Add `/go/android-built-in-kotlin-support` design doc redirect (#13194)
[AGP 9] Added Warning Against Updating to AGP 9 (flutter#181977)
[AGP 9] Bumping KGP error minimum to 2.0.0 (#184385)
[AGP 9] Add Disable Built-in Kotlin and newDSL Migratorrs (#184255)
6 remaining items
Add Support For Built-in Kotlin (flutter#184227)
[Re-land] Add Support For Built-in Kotlin (flutter#184745)
[-]☔ Flutter Supports AGP 9[/-][+]☔ Flutter Fully Supports AGP 9[/+]chore(mobile_android/deps): hold AGP at 8.x until Flutter plugins sup…
chore(ci): hold health-connect behind the same AGP 9 wall as the AGP …
Daracul commentedon Aug 21, 2026
Add-to-app (
include_flutter.groovy) fails with FGP NPE on AGP 9 defaults — repro from a production appSetup: Android host app on AGP 9.2.1 / Gradle 9.6.1, Flutter module included from source via
include_flutter.groovy(add-to-app), Flutter 3.47.1, AGP 9 defaults (android.newDsl/android.builtInKotlinnot overridden). All plugin dependencies already migrated off unconditional KGP.Gradle sync fails applying FGP to the module project:
With
newDsl=truethe legacyBaseExtensionis not registered, soextensions.findByType(BaseExtension::class.java)!!throws. #191218 appears to cover this exact path (buildModeFor/ plugin dependency wiring) — howevergetLegacyAndroidExtensionhas ~14 call sites in 3.47.1 (PluginHandler.kt,FlutterPlugin.kt:249,FlutterPluginUtils.kt:533/797/923), so subsequent failures are likely after the first one is fixed.Is the add-to-app /
include_flutterpath covered by the AGP 9 migration test matrix? Happy to test snapshots against our host app.jesswrd commentedon Aug 24, 2026
@Daracul Can you make a separate issue for this? Also the Flutter team is in the process of migrating to the new AGP DSL such that Flutter Android apps (and also android host apps in add-to-app scenarios like in your case) can successfully build when opted-in to
android.newDslhere.For now, if you want to successfully use AGP 9, you have to:
android.builtInKotlin=falseto your android host app'sgradle.propertiesandroid.newDsl=falsein your android host app'sgradle.properties^The above is vaguely referenced in the Flutter Docs here. I'm gonna add more context and possibly make a separate more focused doc for developers utilizing add-to-app scenarios.
[AGP 9] Added Warning Against Updating to AGP 9 (#181977)
[AGP 9] Bumping KGP error minimum to 2.0.0 (#184385)
[AGP 9] Add Disable Built-in Kotlin and newDSL Migratorrs (#184255)
Add Support For Built-in Kotlin (#184227)
[Re-land] Add Support For Built-in Kotlin (#184745)
[FGP] Report the real error when applying kotlin-android fails (flutt…
[CP-beta][FGP] Report the real error when applying kotlin-android fai…
[FGP] Report the real error when applying kotlin-android fails (flutt…