Maaz Zindani

Loading the index…

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

Play Console will not accept the release because of its target API level

ErrorPlay Console blocks submitting a release whose app bundle targets an API level below 36

Short answer

Since 31 August 2026, Google Play accepts new phone and tablet apps and updates only if they target Android 16 (API level 36); the extension window ran to 1 November 2026. In a Flutter app, set targetSdk to 36 (flutter.targetSdkVersion on current stable), rebuild the bundle, then test edge-to-edge layouts, back navigation and tablet orientation, which change at that level.

  • Applies to Flutter 3.50 stable, Android Gradle Plugin 8.9.1 or later, Android SDK Build-Tools 36, Android 16 emulator
  • Updated
  • By Maaz Zindani, Senior Software Engineer

Fix it fast

  1. 1Find out which cause you have

    Read the target level from the file you are about to upload, not from the Gradle file you think applies. Build the release, then let aapt2 from the SDK build-tools print the manifest values Play will see.

    flutter build apk --release
    AAPT2="$(ls -d "$ANDROID_HOME"/build-tools/* | tail -n 1)/aapt2"
    "$AAPT2" dump badging build/app/outputs/flutter-apk/app-release.apk | grep -E "sdkVersion|targetSdkVersion"
  2. 2Match what you see, then jump to its fix

    1. 1aapt2 prints targetSdkVersion:'35' or lower, and android/app/build.gradle(.kts) contains a literal numbertargetSdk is typed as a fixed number in the app moduleFix
    2. 2targetSdk uses flutter.targetSdkVersion but the built app still reports a lower level, or Gradle says the maximum recommended compile SDK for your AGP is lowerThe Flutter SDK or Android Gradle Plugin is too old for API 36Fix
    3. 3Headers sit under the clock, bottom buttons hide behind the gesture bar on Android 15 and 16After the bump, content slides under the status and navigation barsFix
    4. 4A 'discard changes?' prompt never appears, or the app closes when it should go back one screenBack navigation behaves differently on Android 16Fix
    5. 5On large screens the app rotates or fills the whole window although it is locked to portraitPortrait-only layouts stretch on tablets and foldablesFix

What does the error look like?

  • Play Console blocks submitting a release whose app bundle targets an API level below 36
  • A target API level warning on the Policy status page, with an extension form link
  • Users on newer phones see that the app is not available because it was made for an older version of Android

Cause 1 of 5

targetSdk is typed as a fixed number in the app module

1Check

The deadline for the rule (checked against Google's Play requirement pages on 16 November 2026): new apps and updates must target API 36 from 31 August 2026; Wear OS and Automotive need 35, Android TV and XR need 34. Existing apps must target at least 35 to keep reaching new users on newer Android. A number written in by hand never moves when you upgrade Flutter, so the app quietly falls behind.

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

2Fix

Go back to Flutter's value or write 36. compileSdk has to be at least as high as targetSdk, so raise both together.

// android/app/build.gradle.kts
android {
    compileSdk = flutter.compileSdkVersion   // or 36
    defaultConfig {
        targetSdk = flutter.targetSdkVersion // or 36
    }
}

3Verify

Rebuild and read the manifest again; then upload to an internal testing track before production.

flutter build appbundle --release
flutter build apk --release && "$AAPT2" dump badging build/app/outputs/flutter-apk/app-release.apk | grep targetSdkVersion
Did this fix it?

Cause 2 of 5

The Flutter SDK or Android Gradle Plugin is too old for API 36

1Check

flutter.targetSdkVersion is whatever your Flutter SDK defines, so an old Flutter keeps an old target. Current stable (3.50) resolves it to 36. If you write 36 yourself, the Android Gradle Plugin must know that level: Android lists AGP 8.9.1 as the minimum for API 36.

flutter --version
grep -n "com.android.application" android/settings.gradle*

2Fix

Upgrade Flutter and let its migrators run, then raise AGP and the Gradle wrapper to a matching pair if the build asks for it. If you cannot upgrade Flutter before the deadline, set 36 explicitly and raise AGP alone.

flutter upgrade
flutter clean && flutter pub get
flutter build appbundle --release

3Verify

The bundle builds without compile SDK warnings and aapt2 reports targetSdkVersion:'36'.

flutter build apk --release && "$AAPT2" dump badging build/app/outputs/flutter-apk/app-release.apk | grep targetSdkVersion
Did this fix it?

Cause 3 of 5

After the bump, content slides under the status and navigation bars

1Check

Apps that target 35 already draw edge to edge, but could opt out with windowOptOutEdgeToEdgeEnforcement. When you target 36 on an Android 16 device that attribute is ignored. Look for it in your theme files, and for screens that do not reserve room for system bars.

grep -rn "windowOptOutEdgeToEdgeEnforcement" android/app/src/main/res/
grep -rn "SafeArea\|viewPadding" lib/ | head -n 20

2Fix

Remove the opt-out and let each screen handle insets: wrap top-level bodies in SafeArea, or read MediaQuery padding where a design needs colour behind the bars.

Scaffold(
  body: SafeArea(
    child: content,
  ),
)

3Verify

Run on an Android 16 emulator with gesture navigation and with three-button navigation, in light and dark themes.

flutter run --release -d emulator-5554
Did this fix it?

Cause 4 of 5

Back navigation behaves differently on Android 16

1Check

For apps that target 36 running on Android 16, predictive back is on by default, onBackPressed is no longer called and the back key event is not sent. Flutter code built on the deprecated WillPopScope, or native code that overrides onBackPressed in MainActivity or a plugin, stops working.

grep -rn "WillPopScope" lib/
grep -rn "onBackPressed" android/app/src/

2Fix

Move to PopScope: decide up front with canPop whether a route may close, and react in onPopInvokedWithResult. As a short-term measure only, Android lets you opt out with android:enableOnBackInvokedCallback="false" on the application tag.

PopScope(
  canPop: !hasUnsavedChanges,
  onPopInvokedWithResult: (didPop, result) async {
    if (didPop) return;
    final discard = await confirmDiscard(context);
    if (discard && context.mounted) Navigator.of(context).pop();
  },
  child: form,
)

3Verify

On an Android 16 emulator, swipe back from every screen that guards unsaved data and from the home screen.

flutter run -d emulator-5554
Did this fix it?

Cause 5 of 5

Portrait-only layouts stretch on tablets and foldables

1Check

Targeting 36 makes Android ignore orientation, resizability and aspect-ratio limits on displays at least 600dp wide (games excepted). That covers android:screenOrientation in the manifest and orientation requests made from Flutter. Phones are not affected.

grep -n "screenOrientation\|resizeableActivity" android/app/src/main/AndroidManifest.xml
grep -rn "setPreferredOrientations" lib/

2Fix

Make the main screens usable in landscape with LayoutBuilder or breakpoints. Android offers a temporary per-app opt-out property, but it stops applying once you target API 37.

<!-- AndroidManifest.xml, inside <application>; temporary -->
<property
    android:name="android.window.PROPERTY_COMPAT_ALLOW_RESTRICTED_RESIZABILITY"
    android:value="true" />

3Verify

Test on a tablet or foldable emulator in both orientations and in split screen.

flutter emulators
Did this fix it?

How do I stop it coming back?

  • Keep targetSdk on flutter.targetSdkVersion and upgrade Flutter at least twice a year, so the target moves with the SDK.
  • Plan the bump each spring: Play's recent deadlines have fallen on 31 August, and any extension has to be requested through Play Console before it runs out.
  • Read the behaviour-change list for each new Android version and keep one emulator on the newest release in your test routine.
  • Ship target bumps through an internal or closed testing track first, so layout and back-navigation regressions surface before users see them.

Sources

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.

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.