我可以针对未发布的 SDK 版本吗?

Can I target an unreleased SDK version?

我正在开发一个应用程序,我知道我会在今年维护它,至少在下一个 Android 版本 (P) 发布之前。我应该提一下,我没有使用新平台附带的任何新功能。

是否不建议使用基于开发者预览(当前为 DP1)的 targetSdkVersion 来发布到商店?如果是,如何?

我认为 this documentation 回答了你的问题:

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.

时间轴和更新部分说:

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.

因此,如果 unreleased SDK 问题的标题意味着 Preview SDK,则无法将您的应用程序发布到 Google播放频道。如果您的意思是针对 Developer Preview 测试您的应用程序,您可以使用 Android P final SDK 发布它。

文档还说:

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.

从 M、N 和 O 开始,最终 SDK 已在 6 月或 8 月发布。

Android O final SDK(2018 年 6 月 8 日)

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(2017 年 6 月 15 日)

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(2016 年 8 月 17 日)

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.