Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages
Flutter and app store releases

Flutter says plugins need a higher compileSdk or a different NDK

ErrorYour project is configured to compile against Android SDK 35, but the following plugin(s) require

Short answer

Flutter checks every plugin's compileSdk and NDK version before building. If a plugin compiles against a higher Android SDK than your app, it names the plugins and the exact value to put in your app's build file. If the NDK differs, it does the same for ndkVersion. A higher compileSdk also needs a new enough Android Gradle plugin.

  • Applies to Flutter 3.50 stable, Android Gradle Plugin 8.9 to 9.5, Gradle 8.13 to 9.6
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Read the list under the warning. Each plugin line gives the SDK or NDK version it needs; the highest one is the number to use.

    flutter build apk --debug 2>&1 | grep -B2 -A8 "configured"
  2. 2Match what you see, then jump to its fix

    1. 1following plugin(s) require to be compiled against a higher Android SDK versioncompileSdk in the app is lower than a plugin'sFix
    2. 2You raised compileSdk and the project uses an AGP older than that API level needsThe Android Gradle plugin is too old for the new compileSdkFix
    3. 3following plugin(s) depend on a different Android NDK versionA plugin needs a different NDK versionFix

What does the error look like?

  • Your project is configured to compile against Android SDK 35, but the following plugin(s) require
  • to be compiled against a higher Android SDK version:
  • Fix this issue by compiling against the highest Android SDK version (they are backward compatible).
  • a different Android NDK version:

Cause 1 of 3

compileSdk in the app is lower than a plugin's

1Check

The app's compileSdk is compared with each plugin's. If the app sets none, Flutter treats it as unlimited, so this only appears when you hard-coded a number. Look at the file Flutter names.

grep -n "compileSdk" android/app/build.gradle*

2Fix

Set compileSdk to the highest plugin value from the list. Plugins are backward compatible, so a higher number is safe. It only changes which Android APIs you can call; it is not targetSdk.

// android/app/build.gradle.kts
android {
    compileSdk = 36
}

3Verify

The warning is gone and the build continues.

flutter build apk --debug

Confirmed by raw.githubusercontent.com

Did this fix it?

Cause 2 of 3

The Android Gradle plugin is too old for the new compileSdk

1Check

Android's minimum tool table: API 35 needs AGP 8.6.0, API 36 needs 8.9.1, API 36.1 needs 8.13.0 and API 37 needs 9.1.1. Check which AGP your project uses.

grep -rn "com.android.application" android/settings.gradle* android/build.gradle*

2Fix

Raise the AGP version in settings.gradle(.kts) to at least the one your compileSdk needs, and use the Gradle version that AGP requires (8.13 needs Gradle 8.13, 9.0 needs 9.1.0).

// android/settings.gradle.kts
plugins {
    id("com.android.application") version "8.9.1" apply false
}
# android/gradle/wrapper/gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip

3Verify

A debug build completes with the new compileSdk.

flutter build apk --debug

Confirmed by developer.android.com

Did this fix it?

Cause 3 of 3

A plugin needs a different NDK version

1Check

Flutter compares your ndkVersion with each plugin's. Plugin lines read 'requires Android NDK <version>'.

grep -n "ndkVersion" android/app/build.gradle*

2Fix

Use the highest NDK version from the list; Flutter states that NDK versions are backward compatible.

// android/app/build.gradle.kts
android {
    ndkVersion = "28.2.13676358"   // use the value printed in the warning
}

3Verify

The NDK warning no longer appears.

flutter build apk --debug

Confirmed by raw.githubusercontent.com

Did this fix it?

How do I stop it coming back?

  • Prefer the values Flutter's template sets over copying old numbers from other projects.
  • Raise compileSdk and the Android Gradle plugin in the same change, not one at a time.
  • Run flutter pub outdated before an upgrade, and build once after each plugin bump.

Sources

How was this page made?

I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. 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.

Which stack is behind this page?

Projects of mine built on the same technologies:

Related fixes

Mobile apps

Google Play says the app does not support 16 KB memory pages

check_elf_alignment.sh reports UNALIGNED for a library under lib/arm64-v8a

Google Play requires apps that target Android 15 or higher and ship native .so libraries to run on devices with 16 KB memory pages; from 1 February 2027 it will block updates that do not.

5 causes, each with a fix

Next step

Want this handled for good?

I look after servers, apps and releases end to end. Tell me what keeps breaking.