android - 为什么在使用弃用项之前验证 Build.VERSION.SDK_INT 时弃用警告不会消失?

标签 android android-studio

THEME_HOLO_LIGHT在 API 23 中已弃用。

那么为什么在验证我在 API < 23 上使用它时仍然收到弃用警告?

enter image description here

我的 build.gradle 的相关部分:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    useLibrary "org.apache.http.legacy"
    defaultConfig {
        applicationId "com.my.app"
        minSdkVersion 14
        targetSdkVersion 23
}

最佳答案

我在使用包含弃用代码的 targetSdkVersion 时也遇到了同样的问题。 if 语句似乎被 Lint 检查忽略了。因此,我必须抑制该 block 上的 lint 以删除警告。

关于android - 为什么在使用弃用项之前验证 Build.VERSION.SDK_INT 时弃用警告不会消失?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35881522/

相关文章:

java - SwipeRefreshLayout 不遵守约束

android-studio - flutter 应用栏中不需要的操作按钮

java - android 中的 CursorIndexOutOfBoundsException

Android 即时应用程序 : Feature module : The module cannot be android library

android - onLocationChanged 从未调用过,GoogleApiClient

java - 从 eclipse 下载应用程序

安卓房间 : How to Migrate Column Renaming?

javascript - 安装 Phonegap/Cordova 3.1 插件 (barcodescanner)

Android SQLite 事务和多线程

java - searchview.onQueryTextListener 之后得到错误的位置 recyclerview