Target API Level policy

App Quality: Target API Level Does Not Meet Requirements

Medium RiskMedium Difficulty0 Reports
Also known as:Legacy app not updated in years with outdated targetSdkVersion in build.gradleDependencies on deprecated APIs that were removed or restricted in newer Android versionsThird-party SDK that hasn't been updated and pins to an older target API levelGradle misconfiguration where targetSdkVersion is set in multiple places with conflicting values

Our Take

Your app targets an Android API level below Google Play's current minimum requirement. As of 2025, new apps must target at least API level 34 (Android 14), and app updates must also target API level 34 or higher. Apps targeting outdated API levels are blocked from being published or updated on Google Play.

Resolution Guide

01

**Update build.gradle** — Set `targetSdkVersion` to the required level (currently 34):

```gradle

android {

defaultConfig {

targetSdkVersion 34

}

}

```

Also update `compileSdkVersion` to match or exceed the target.

02

**Review behavior changes** — Each API level introduces behavior changes. Check the official migration guides:

  • API 32: Bluetooth permissions changes
  • - API 33: POST_NOTIFICATIONS permission, granular media permissions

    - API 34: Foreground service types required, restrictions on implicit intents

    03

    **Update third-party SDKs** — Check all dependencies for API level compatibility. Update to latest versions. If an SDK doesn't support the target API level, find an alternative or contact the maintainer.


    04

    **Handle new permissions** — API 33+ requires POST_NOTIFICATIONS runtime permission. API 34 requires declaring foreground service types in the manifest:

    ```xml

    <service android:name=".MyService"

    android:foregroundServiceType="location|camera" />

    ```

    05

    **Test on target API emulator** — Create an emulator with the target API level. Test all features, especially background work, notifications, file access, and location.


    06

    **Check for deprecated API usage** — Use Android Lint (`./gradlew lint`) to find deprecated API calls. Replace them with recommended alternatives.


    07

    **Verify Gradle consistency** — Ensure `targetSdkVersion` isn't overridden in product flavors or build types. Check both `build.gradle` and `build.gradle.kts` if migrating.


    Example Rejection Email

    From:Google Play Developer Support
    Subject:Policy violation - App Quality: Target API Level Does Not M
    Your app update has been rejected Your app currently targets API level 31 (Android 12). Starting August 31, 2024, app updates must target at least API level 34 (Android 14). Action required: Update your app's targetSdkVersion to 34 or higher in your build.gradle file, address any behavior changes introduced in API levels 32-34, and re-submit your update.

    Before & After

    Before — Rejected

    build.gradle has targetSdkVersion 31 with compileSdkVersion 31, uses deprecated JobIntentService, and relies on an old AdMob SDK version that doesn't support API 34

    After — Approved

    build.gradle updated to targetSdkVersion 34, compileSdkVersion 34, JobIntentService replaced with WorkManager, AdMob SDK updated to latest version, POST_NOTIFICATIONS permission added with runtime request

    What changed: Updating targetSdkVersion is not just changing a number — you must handle all behavior changes, update dependencies, and test thoroughly on the target API level

    Community Solutions · 0

    Sign in to share your solution.