Meet Google Play's target API level requirement

Google Play will require that new apps target at least Android 8.0 (API level 26) from August 2018, and that app updates target Android 8.0 from November 2018.

Every new Android version introduces changes that bring significant security and performance improvements – and enhance the user experience of Android overall. Some of these changes only apply to apps that explicitly declare support through their targetSdkVersion manifest attribute (also known as the target API level).

Configuring your app to target a recent API level ensures that users can benefit from these improvements, while still allowing it to run on older Android versions. Targeting a recent API level also allows your app to take advantage of the platform's latest features to delight your users.

This document highlights important points you should know in updating your target API level to meet the Google Play requirement. To proceed, click on on your app's current API level:

Note: If your gradle file contains manifest entries, you can confirm or change the current value of targetSdkVersion in your app's gradle file, as described in Configure Your Build. Alternatively, you can use the android:targetSdkVersion attribute in the manifest file, as described in the documentation for the <uses-sdk> manifest element.

Earlier than Android 5.0 (API level 21)

See the respective Behavior Changes page for each of the following releases to ensure your that your app has accounted for changes introduced in these releases:

Continue by following the instructions in the next section.

Earlier than Android 6.0 (API level 23)

The following considerations apply to apps targeting Android 6.0 and higher versions of the platform:

  • Runtime Permissions
    • Dangerous permissions are only granted at runtime. Your UI flows must provide affordances for granting these permissions.
    • Wherever possible, your app should be prepared to handle rejection of permission requests. For example, if a user declines a request to access the device's GPS, your app should have another way to proceed.

For an exhaustive list of changes introduced in Android 6.0 (API level 23), see the Behavior Changes page for that version of the platform.

Continue by following the instructions in the next section.

Earlier than Android 7.0 (API level 24)

The following considerations apply to apps targeting Android 7.0 and higher versions of the platform:

  • Doze and App Standby

    You should design for behaviors described in Optimizing for Doze and App Standby, which encompasses incremental changes introduced across several platform releases.

    When a device is in Doze and App Standby Mode, the system behaves as follows:

    • Restricts network access.
    • Defers alarms, syncs, and jobs.
    • Restricts GPS and Wi-Fi scans.
    • Restricts normal-priority Firebase Cloud Messaging messages.
  • Permission Changes
    • The system restricts access to app private directories.
    • Exposing a file:// URI outside of your app triggers a FileUriExposedException. Developers who need to share files outside of their apps should implement FileProvider.
  • The system forbids linking to non-NDK libraries.

For an exhaustive list of changes introduced in Android 7.0 (API level 24), see the Behavior Changes page for that version of the platform.

Continue by following the instructions in the next section.

Earlier than Android 8.0 (API level 26)

The following considerations apply to apps targeting Android 8.0 and higher versions of the platform:

For an exhaustive list of changes introduced in Android 8.0 (API level 26), see the Behavior Changes page for that version of the platform.

Continue by following the instructions in the next section.

Modernizing your apps

As you update the target API level for your apps, consider adopting recent platform features to modernize your apps and delight your users.

Check and update your SDKs and libraries

Make sure that your third-party SDK dependencies support API 26: Some SDK providers publish it in their manifest; others will require additional investigation. If you use an SDK that doesn't support API 26, please make it a priority to work with the SDK provider to resolve the issue.

Additionally, note that your app or game's targetSdkVersion may restrict access to private Android platform libraries; see NDK Apps Linking to Platform Libraries for details.

You should also verify any restrictions that may exist in the verson of the Android Support Library that you're using. As always, you must ensure compatibility between the major version of Android Support Library and your app’s compileSdkVersion.

We recommend that you choose a targetSdkVersion smaller than or equal to the Support Library’s major version. We encourage you to update to a recent compatible Support Library in order to take advantage of the latest compatibility features and bug fixes.

Test your app

After you update your app's API level and features as appropriate, you should test some core use cases. The following suggestions are not exhaustive, but aim to guide your testing process. We suggest testing:

  • That your app compiles to API 26 without errors or warnings.
  • That your app has a strategy for cases where the user rejects permission requests, and prompts the user for permissions. To do so:
    • Go to your app's App Info screen, and disable each permission.
    • Open the app and ensure no crashes.
    • Perform core use case tests and ensure required permissions are re-prompted.

  • Handles Doze with expected results and no errors.
    • Using adb, place your test device into Doze while your app is running.
      • Test any use cases that trigger Firebase Cloud Messaging messages.
      • Test any use cases that use Alarms or Jobs.
      • Eliminate any dependencies on background services.
    • Set your app into App Standby
      • Test any use cases that trigger Firebase Cloud Messaging messages.
      • Test any use cases that use Alarms.

  • Handles new photos / video being taken
  • Handles sharing files to other apps
    • Test any use case that shares file data with any other app (even another app by the same developer)
    • Test the content is visible in the other app and doesn’t trigger crashes.

Further information

Opt in to emails in the Google Play Console so that we can send you important updates and announcements from Android and Google Play, including our monthly partner newsletter.