0

I have just upgraded the gradle plugin in my app to version 3.2.

I'm now getting a lint error stating that FloatProperty, which was already being used in my app, cannot be used. The minimum API level in my gradle file is 21. The error is:

Class requires API level 24 (current min is 21)

My question is why does this build and run fine even on my test phone running API 22?

tom808
  • 320
  • 2
  • 11

1 Answers1

0

your compileSdkVersion which is 28 on its own has nothing to do with what devices can and cannot run your app. Usually, you set this to be the latest version of the Android SDK.

Frequently, the development tools will warn you on the fly when you try using something that is newer than your minSdkVersion. You can run a full Lint check to reconfirm periodically.

targetSdkVersion helps with backwards compatibility, and usually my description is "it's the version of Android that you were thinking of at the time you were writing the code".

ismail alaoui
  • 5,748
  • 2
  • 21
  • 38