Flutter and app store releases · Comparison
AGP warns that compileSdk is newer than the plugin was tested with
Short answer
Your compileSdk is higher than the newest API level this Android Gradle plugin was tested with. The real fix is upgrading AGP to at least Google's minimum for that level: 8.9.1 for API 36, 8.13.0 for 36.1, 9.1.1 for API 37. Suppress the warning with android.suppressUnsupportedCompileSdk only when you already run the newest stable AGP.
Every AGP release carries a maximum compile SDK it was tested against. When a module's compileSdk is above that number, AGP prints this warning during configuration and keeps building. Nothing is broken yet; the plugin is telling you it never checked the combination you are running.
There are three ways to respond, and only one is right most of the time. The table sets them side by side; the sections below it cover the version numbers, the upgrade itself and the narrow case where silencing the warning is the honest choice.
At a glance
| Response | Right when | What it costs | What you end up with |
|---|---|---|---|
| Upgrade AGP to the minimum for your compileSdk or later | Almost always: a stable AGP that supports the level exists | Gradle, and sometimes the JDK and Android Studio, move with it; deprecated DSL may need edits | A tested toolchain and no warning |
| Suppress the warning for that one API level | You already run the newest stable AGP and the level is newer than all of them | The combination stays untested until the next AGP release | A quiet build that still warns about any other level |
| Lower compileSdk back under the tested maximum | Nothing in the project needs the newer APIs yet | Libraries that require the newer level fail their AAR metadata check, and new APIs stay out of reach | A warning-free build on older platform APIs |
The two numbers the warning gives you
Read past the first line. AGP's source prints a second line in the form This Android Gradle plugin (x.y.z) was tested up to compile SDK version N, with older releases writing it as compileSdk = N. Put that next to the compileSdk your modules declare. If yours is higher, the warning is accurate and the version table below says which AGP closes the gap.
A different headline, saying a preview compile SDK has not been tested with this version of the plugin, means a module uses compileSdkPreview. Google recommends the latest preview Android Studio and AGP for work on preview versions of Android, installed next to your stable Studio, rather than a stable AGP.
Show the warning and every compileSdk
./gradlew help 2>&1 | grep -A3 "newer Android Gradle plugin\|has not been tested"
grep -rn "compileSdk" --include="*.gradle*" --include="*.toml" .Minimum AGP and Android Studio for each compileSdk
| compileSdk | Minimum AGP | Minimum Android Studio |
|---|---|---|
| 37 | 9.1.1 | Panda 3 (2025.3.3) Patch 1 |
| 36.1 | 8.13.0 | Narwhal 3 Feature Drop (2025.1.3) |
| 36 | 8.9.1 | Meerkat (2024.3.1) Patch 1 |
| 35 | 8.6.0 | Koala Feature Drop (2024.2.1) |
| 34 | 8.1.1 | Hedgehog (2023.1.1) |
Google's page warns that using a lower Android Studio or AGP than the project's compileSdk or targetSdk requires could lead to unexpected issues. The minimum is a floor; the latest stable AGP is the better target.
What moves with an AGP upgrade
AGP fixes the Gradle and JDK versions it accepts, so raising it is rarely a one-line change. For AGP 9.5 the release notes give API 37 as the maximum supported level, Gradle 9.6.0 as both minimum and default, SDK Build Tools 36.0.0 and JDK 17. Update the wrapper in the same commit, and build once from a clean checkout before merging.
Find where the version is declared first. Newer projects keep it in gradle/libs.versions.toml; older ones in a classpath line in the root build file; Flutter's Android folder keeps it in the plugins block of settings.gradle or settings.gradle.kts. Changing it in one place while another still pins an older release leaves the warning in place.
Raise AGP and the wrapper together
# gradle/libs.versions.toml
[versions]
agp = "9.5.2"
# move Gradle with it (9.6.0 or newer for AGP 9.5)
./gradlew wrapper --gradle-version 9.9.2When suppressing is the honest answer
Right after Google ships a new API level, the newest stable AGP may not know it yet. The warning text itself allows for this: if you already use the latest version, it says you may need to wait for a release that supports that compile SDK. In that window, keep working and silence only that level.
AGP reads android.suppressUnsupportedCompileSdk from gradle.properties. The source splits it on commas, and the warning prints the exact line to add, including any levels already listed. Copy that line rather than typing the value, because minor levels such as 36.1 are written with the decimal.
Suppress one level, nothing more
# gradle.properties: only the level the warning names
android.suppressUnsupportedCompileSdk=37- Write the date and the AGP release you are waiting for in a comment above it.
- Delete the line in the commit that upgrades AGP, so the next mismatch warns again.
- Never use it to avoid an upgrade that already exists: the table above tells you when one does.
Why lowering compileSdk usually backfires
compileSdk decides which platform APIs your code and your libraries compile against. A library can declare minCompileSdk in its AAR metadata, the minimum compile SDK any consuming module must use, and many recent AndroidX releases do; a module that compiles below it does not build. Rolling back from 36 to 35 to dodge a warning often swaps it for a hard error, and it blocks any API you raised the level to use.
It is a fair choice only for a module that has no such dependency and no need for the newer APIs, and even then it only postpones the AGP upgrade.
Which to pick
- The warning means compileSdk is above the AGP's tested maximum; the build still runs.
- Upgrade AGP to at least the minimum for your level, with Gradle and the JDK.
- Suppress only when the newest stable AGP is still behind, and only for the level named.
- Lowering compileSdk tends to trade the warning for an AAR metadata error.
Sources
- Android Developers: minimum AGP per API level
- AGP 9.5 release notes (maximum API level 37, Gradle 9.6.0, JDK 17)
- AGP source: compileSdk warning text (SdkParsingUtils.kt)
- AGP source: android.suppressUnsupportedCompileSdk option
- Android Gradle API: AarMetadata (minCompileSdk)
- Flutter: applying the Android Gradle plugins with the plugins block
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.