我非常习惯于为旧版本的 android 创建应用程序,但最近我一直在开发一个用户群主要是 SDK 19+ 的应用程序。
我现在正在尝试更新我的 gradle 依赖项,并且想知道我是否应该将 compileSDKVersion
以及 buildToolsVersion
设置为针对 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.
由于 API 24 是最新的 SDK,您应该考虑使用它进行编译。正如同一篇博文中所述,这并不意味着您必须以 API 24 为目标。
关于android - 为 SDK 24 构建安全吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38152830/