Why does the obsolescence warning not disappear when validating Build.VERSION.SDK_INT before using the obsolete item?

THEME_HOLO_LIGHT deprecated in API 23.

So why am I still getting an obsolescence warning when I verify that I am using it in API <23?

enter image description here

Relevant part of mine build.gradle:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
    useLibrary "org.apache.http.legacy"
    defaultConfig {
        applicationId "com.my.app"
        minSdkVersion 14
        targetSdkVersion 23
}
+4
source share
1 answer

I also ran into the same issue when using targetSdkVersioncontaining legacy code. The statement seems to be ifignored by validation Lint. Therefore, in order to remove the warning, I need to suppress lint on this block.

+1
source

All Articles