Repository navigation
Closed
Closed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
If a project uses an existing Android Gradle Plugin (AGP) version newer than Flutter supports, the Flutter Gradle Plugin fails the build with an error telling the user to downgrade AGP.
The Flutter tool also prints the android.newDsl Flutter Fix message for the same failure. That message tells the user to update Flutter or opt out of android.newDsl, while the Gradle error tells them to downgrade AGP. Seeing both at once suggests two separate problems, and the user can't tell which fix to apply.
$ flutter build apk
FAILURE: Build failed with an exception.
* Where:
Build file '/path/to/my_app/android/app/build.gradle.kts' line: 1
* What went wrong:
An exception occurred applying plugin request [id: 'dev.flutter.flutter-gradle-plugin']
> Failed to apply plugin 'dev.flutter.flutter-gradle-plugin'.
> Error: Your project's Android Gradle Plugin version (9.3.1) is not yet supported. Flutter does not support Android Gradle Plugin 9, and support will be added in a future Flutter release. Please downgrade your Android Gradle Plugin version to a version below 9.0.0 to continue.
Alternatively, use the flag "--android-skip-build-dependency-validation" to bypass this check (unsupported; your build may fail).
Potential fix: Your project's AGP version is typically defined in the plugins block of the `settings.gradle` file (/path/to/my_app/android/settings.gradle), by a plugin with the id of com.android.application.
If you don't see a plugins block, your project was likely created with an older template version. In this case it is most likely defined in the top-level build.gradle file (/path/to/my_app/android/build.gradle) by the following line in the dependencies block of the buildscript: "classpath 'com.android.tools.build:gradle:<version>'".
BUILD FAILED in 28s
Running Gradle task 'assembleRelease'... 28.2s
┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Starting AGP 9+, only the new DSL interface will be read. │
│ This results in a build failure when applying the Flutter Gradle plugin at /path/to/my_app/android/app/build.gradle.kts. │
│ │
│ To resolve this update flutter or opt out of `android.newDsl`. │
│ For instructions on how to opt out, see: https://developer.android.com/build/releases/agp-9-0-0-release-notes │
│ │
│ If you are not upgrading to AGP 9+, run `flutter analyze --suggestions` to check for incompatible dependencies. │
└──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Gradle task assembleRelease failed with exit code 1
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Activity
[tool] Narrow Scope of AGP DSL Flutter Fix Message (flutter#193610)
github-actions commentedon Oct 21, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.[tool] Narrow Scope of AGP DSL Flutter Fix Message (flutter#193610)