Skip to content

Resolving "App Must Target Android 14 (API Level 34)" Warning After Update

Problem Statement

After updating your Android app's targetSdkVersion to 34 (Android 14), you may still encounter Google Play Console warnings stating your app doesn't meet the API level 34 requirement. This typically occurs when older app bundles targeting lower API levels remain active in testing tracks or production release channels, even after you've successfully built and uploaded a compliant APK.

Primary Solution: Update All Active Tracks in Google Play Console

Step 1: Verify Code Configuration

Ensure your build.gradle is correctly configured. Open android/app/build.gradle and confirm:

gradle
android {
    compileSdk 34 // Modern property (or compileSdkVersion 34)
    // ...
    defaultConfig {
        targetSdk 34 // Modern property (or targetSdkVersion 34)
        minSdk 21 // Minimum SDK shouldn't need changing
    }
}

Step 2: Audit Google Play Console Tracks

All active tracks must use an API 34-compliant bundle:

  1. Navigate to Google Play ConsoleRelease section
  2. Check each track:
    • Production
    • Open testing
    • Closed testing
    • Internal testing
  3. Identify tracks containing older API 33 (or lower) bundles

Step 3: Replace Non-Compliant Bundles

For tracks with old bundles:

  1. Click "Create new release" in the problematic track
  2. Select your latest API 34-compliant bundle
  3. Submit for review
  4. After approval, deactivate the old release

WARNING

Google Play warns about non-compliant bundles even in inactive tracks if they're accessible to users:

Active Bundle Warning

Step 4: Verify 100% Rollout

For staged rollouts in Production:

  1. Confirm rollout is set to 100%
  2. Older releases become "Superseded" after full rollout

Wait 24-48 hours after deployment for Play Console to resolve the warning.

Alternative Causes and Solutions

Dependency Issues (Flutter/Kotlin)

Add required annotations dependency in build.gradle:

gradle
dependencies {
    ...
    implementation 'org.jetbrains:annotations:16.0.2' // Required for targetSdk 34
}

Broadcast Receiver Fix

For apps with broadcast receivers, add this to MainApplication.java:

java
@Override
public Intent registerReceiver(BroadcastReceiver receiver, IntentFilter filter) {
    if (Build.VERSION.SDK_INT >= 34 && getApplicationInfo().targetSdkVersion >= 34) {
        return super.registerReceiver(receiver, filter, Context.RECEIVER_EXPORTED);
    }
    return super.registerReceiver(receiver, filter);
}

Flutter-Specific Paths

  1. Update android/gradle.properties:
    properties
    flutter.compileSdkVersion=34
    flutter.targetSdkVersion=34
  2. Modify android/flutter.gradle:
    gradle
    targetSdkVersion 34
    compileSdkVersion 34

Ionic Setup

Update variables.gradle:

gradle
ext {
    compileSdkVersion = 34
    targetSdkVersion = 34
    ...
}

Common Pitfalls to Avoid

Increasing minSdkVersion to 34:
Unnecessarily limits app to Android 14+ devices. Keep reasonable minimum (e.g., 21).

Partial rollouts:
Ensure new releases reach 100% of users to supersede old versions.

Ignoring testing tracks:
Internal/closed tracks must be updated just like production.

Testing Strategy

After updating, install build in an Android 14 emulator with Google Play Services to validate runtime behavior