Android Lint error: Class requires API level 3, current is min is 1

12,953

Solution 1

In your manifest file set the sdk like this based on your requirement..

 <uses-sdk
    android:maxSdkVersion="17"
    android:minSdkVersion="8" />

Solution 2

Restart and invalidate cache if this error just started up for no apparent reason

Share:
12,953
Elendas
Author by

Elendas

Updated on June 04, 2022

Comments

  • Elendas
    Elendas almost 2 years

    When running my Android app I often get a list of errors, wich says

    Class requires API level 3 (current min is 1): android.hardware.SensorEventListener
    

    I've searched for the correct answer to this, like Android tools > Clear Link Markers, but this doesn't solve the problem. Every once in a while the list of errors keeps coming back. Is it something in my project settings or are my methods deprecated? I've installed the latest SDK for Android 4.4.

  • Justin Meiners
    Justin Meiners almost 7 years
    The documentation recommends excluding the maxSdkVersion unless you have a really good reason. "There is no need to set the attribute as means of blocking deployment of your application onto new versions of the Android platform as they are released. By design, new versions of the platform are fully backward-compatible"