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:
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:
- Navigate to Google Play Console → Release section
- Check each track:
- Production
- Open testing
- Closed testing
- Internal testing
- Identify tracks containing older API 33 (or lower) bundles
Step 3: Replace Non-Compliant Bundles
For tracks with old bundles:
- Click "Create new release" in the problematic track
- Select your latest API 34-compliant bundle
- Submit for review
- After approval, deactivate the old release
WARNING
Google Play warns about non-compliant bundles even in inactive tracks if they're accessible to users:
Step 4: Verify 100% Rollout
For staged rollouts in Production:
- Confirm rollout is set to 100%
- 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
:
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
:
@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
- Update
android/gradle.properties
:propertiesflutter.compileSdkVersion=34 flutter.targetSdkVersion=34
- Modify
android/flutter.gradle
:gradletargetSdkVersion 34 compileSdkVersion 34
Ionic Setup
Update variables.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