Skip to content

[many] Cannot update androidx dependency until gradle is upgraded to 9.1 #189862

Closed

Description

@mboetger

Dependabot build checks are failing when trying to upgrade androidx.core from 1.18 to 1.19:

flutter/packages#11866
flutter/packages#11867
flutter/packages#11865

Checks fail with:

Execution failed for task ':app:checkDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
   > 4 issues were found when checking AAR metadata:

       1.  Dependency 'androidx.core:core-ktx:1.19.0' requires libraries and applications that
           depend on it to compile against version 37 or later of the
           Android APIs.

           :app is currently compiled against android-36.

           Also, the maximum recommended compile SDK version for Android Gradle
           plugin 9.0.1 is 36.

           Recommended action: Update this project's version of the Android Gradle
           plugin to one that supports 37, then update this project to use
           compileSdk of at least 37.

           Note that updating a library or application's compileSdk (which
           allows newer APIs to be used) can be done separately from updating
           targetSdk (which opts the app in to new runtime behavior) and
           minSdk (which determines which devices the app can be installed
           on).

       2.  Dependency 'androidx.core:core-ktx:1.19.0' requires Android Gradle plugin 9.1.0 or higher.

           This build currently uses Android Gradle plugin 9.0.1.

       3.  Dependency 'androidx.core:core:1.19.0' requires libraries and applications that
           depend on it to compile against version 37 or later of the
           Android APIs.

           :app is currently compiled against android-36.

           Also, the maximum recommended compile SDK version for Android Gradle
           plugin 9.0.1 is 36.

           Recommended action: Update this project's version of the Android Gradle
           plugin to one that supports 37, then update this project to use
           compileSdk of at least 37.

           Note that updating a library or application's compileSdk (which
           allows newer APIs to be used) can be done separately from updating
           targetSdk (which opts the app in to new runtime behavior) and
           minSdk (which determines which devices the app can be installed
           on).

       4.  Dependency 'androidx.core:core:1.19.0' requires Android Gradle plugin 9.1.0 or higher.

           This build currently uses Android Gradle plugin 9.0.1.

Activity

  1. mboetger commented on Jul 22, 2026

    @mboetger
    ContributorAuthor

    fyi - @jesswrd

  2. self-assigned this
    on Jul 28, 2026
  3. added
    triaged-androidTriaged by Android platform team
    P2Important issues not at the top of the work list
    on Jul 28, 2026
  4. jesswrd commented on Aug 3, 2026

    @jesswrd
    Contributor

    All plugin example apps (except for legacy build all) have been updated to AGP 9.1.0 as of this PR: flutter/packages#12195. All the failing dependabot PRs will have to be rebased. Even so, the dependabot PRs will fail because androidx 1.19.0 requires SDK 37. When the compileSdk and targetSdk FlutterExtension constants are updated to 37, all example apps will be on SDK 37. Gradle loads FGP (), which reads constants like flutter.compileSdkVersion, flutter.minSdkVersion from FlutterExtension.

  5. mboetger commented on Nov 4, 2026

    @mboetger
    ContributorAuthor

    Closing since AGP upgrade completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Important issues not at the top of the work listteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions