Reputation: 2572
I could understand if the API level required by the call was higher than the minimum, but why should it be a problem if it's equal to the minimum?
Upvotes: 1
Views: 4740
Reputation: 2489
This was a bug in Android Studio 0.1. It is fixed for 0.1.1
See fix: https://android-review.googlesource.com/#/c/58798/1
Upvotes: 5
Reputation: 18978
I got the same problem in Android Studio; it was not a problem in IntelliJ which I had been using prior to AS.
To "fix it" I simply used the TargetApi annotation:
@TargetApi(8)
I only added it to my main Activity and the warnings went away everywhere.
Upvotes: 5
Reputation: 73926
Android Studio has some lint problems because I have this same problem too. The project should still build though. if not just do a simple check for the build version
if(Build.VERSION.SDK_INT > Build.VERSION_CODES.ECLAIR_MR1){
//code goes here
}
and that should suppress the lint check
Upvotes: 0
Reputation: 2976
In AndroidManifest.xml
look at uses-sdk
and value of android:minSdkVersion
. Make sure specified sdk version has level equal or higher then 8.
Upvotes: 0