Inspectopedia Help

Annotate SDK_INT checks

Annotate SDK_INT checks

Methods which perform SDK_INT version checks (or field constants which reflect the result of a version check) in libraries should be annotated with @ChecksSdkIntAtLeast. This makes it possible for lint to correctly check calls into the library later to correctly understand that problematic code which is wrapped within a call into this library is safe after all.

Issue id: AnnotateVersionCheck

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3

Plugin:

Android, 2022.3.1 Beta 2

Last modified: 13 July 2023