How to enable a lint error in Android Studio for the message "API level 21 (current minimum 16) is required for a call"?

I have a method called setImageTintList()that requires a minimum API of 21. But if I set my min API to 16 in gradle, the application will still be created without warning.

Although there is a red line saying:

setImageTintList () - to call requires an API level of 21 (current min is 16)

it does not display an error, error, or compilation.

How to set the lint warning level in Android studio so that it crashes and possibly prevents assembly in such cases?

+4
source share
1

, Android gradle API Android .

gradle-animalsniffer-plugin, .

0

Source: https://habr.com/ru/post/1655874/


All Articles