为 SDK 24 构建安全吗?

Is it safe to build for SDK 24?

我非常习惯于为 android 的旧版本创建应用程序,但最近我一直在开发一个用户群主要是 SDK 19+ 的应用程序。

我正在尝试更新我的 gradle 依赖项,我想知道我是否应该将 compileSDKVersionbuildToolsVersion 升级到 Android N .

我的应用程序中的一切正常,我还不想使用新功能,我只是不喜欢我的 gradle 文件中有过时的依赖项。

很抱歉,这个问题措辞不佳,但我真的不知道还能怎么说。

根据 Picking your compileSdkVersion blog post

Therefore it is strongly recommended that you always compile with the latest SDK. You’ll get all the benefits of new compilation checks on existing code, avoid newly deprecated APIs, and be ready to use new APIs.

由于API24是最新的SDK,你应该考虑用它编译。正如同一博客中所述 post,这并不意味着您必须 target API 24.