Possibly relevant info:
NewApi
lint rule is enabled and marked as error as shown belowminSdkVersion
is set to 21- Android Gradle Plugin version is 3.6.3
- Android Studio version is 3.6.3
- Project uses Kotlin
I expect the IDE to mark the usage of an unavailable API as an error as it used to before, I'm unaware of when it stopped working and can't get it to work again. An example is shown below of an API level 23 method being called without errors, which would crash on an older device.