Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

android

sdk

api

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.

like image 476
Elendas Avatar asked Nov 12 '13 10:11

Elendas


2 Answers

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

 <uses-sdk
    android:maxSdkVersion="17"
    android:minSdkVersion="8" />
like image 141
kalyan pvs Avatar answered Sep 29 '22 21:09

kalyan pvs


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

like image 20
d4c0d312 Avatar answered Sep 29 '22 23:09

d4c0d312