Search code examples
androidandroid-sdk-toolsandroid-versionandroid-9.0-pie

Can I target an unreleased SDK version?


I am developing an app and I know I will maintain it throughout this year, at least until the next Android version (P) will be released. I should mention I don't use any of the new features that come with the new platform.

Is it inadvisable to use targetSdkVersion based on a developer preview (currently DP1) for releases to the store? If yes, how?


Solution

  • I think this documentation answers your question:

    Google Play prevents publishing of apps targeting the P Developer Preview. When the Android P final SDK is available, you’ll be able to target the official Android P API level and publish your app to Google Play via the alpha, beta, and production release channels.

    The section Timeline and updates says:

    At preview 3 you’ll have access to the final P APIs and SDK to develop with, as well as updated beta system images to test system behaviors and features. Android P will provide a standard API level at this time. You can begin final compatibility testing of your legacy apps and refine any new code that is using the P APIs or features.

    Also starting in preview 3, you’ll be able to publish apps to devices running Android P at the official API level, such as consumer devices that have opted into the Android Beta program. You can publish into the Google Play alpha and beta channels first, so you can test your apps with Android Beta consumers before distributing broadly on the store.

    So, if unreleased SDK in question's title means Preview SDK, it's impossible to publish your app into the Google Play channels. If you mean testing your app against Developer Preview, you can publish it with Android P final SDK.

    The document also says:

    The P Developer Preview delivers preview APIs — the APIs will not be official until the final SDK is released, currently planned for the third quarter of 2018.

    As of M, N and O, final SDKs were released in June or August.

    Android O final SDK (08 June 2018)

    Today we're rolling out Developer Preview 3 with the final Android O APIs, ...

    Today's preview update includes the latest version of the Android O platform with the final API level 26 and ...

    Android N final SDK (15 June 2017)

    The final SDK for Android N is now available for download through the SDK Manager in Android Studio. It gives you everything you need to develop and test against the official APIs in the Android N platform. Once you’ve installed the final SDK, you can update your project’s compileSdkVersion to API 24 to develop with the Android N APIs and build and test on the new platform, for new features such as Multi-window support, direct-reply notifications, and others. We also recommend updating your app’s targetSdkVersion to API 24 to opt-in and test your app with Android N specific behavior changes.

    Android M final SDK (17 August 2016)

    Today with the final Developer Preview update, we're introducing the official Android 6.0 SDK and opening Google Play for publishing your apps that target the new API level 23 in Android Marshmallow.