user1408325
user1408325

Reputation:

How to solve this "Class requires API level 11 (current min is 8)"

In my application some methods needs minimum api level 11 . When i run it on android 2.3.3 (api level 10) it crashes .

I reffered this links

How to fix "Call requires API level 11" with Android Activity?

setAdapter "Call requires API level 11 (current min is 8): android.widget.AbsListView#setAdapter"?

android - Call requires API level 9 (current min is 8): android.os.StrictMode#setThreadPolicy

Even i add supports v4 library in my project but nothing happens . can anybody tell me how can i run this project in android 2.3.3 ?

Upvotes: 3

Views: 11857

Answers (2)

Srikanth
Srikanth

Reputation: 584

Firstly 2.3.3 is not the api 8 it was api 10.. Download the api 10 sdk and do the bellow changes

In Manifest file declare the minimum sdk is android:minSdkVersion="8" targeted is android:targetSdkVersion="10"

Upvotes: 1

Ted Hopp
Ted Hopp

Reputation: 234795

To eliminate the errors, you need to either set your minimum API level to 11 (and not run on API 8 devices) or else you need to avoid using API 11 features.

Generally, it's not enough to just add the v4 library to your project. You also need to change the calls to use the compatibility library code instead of the API 11 methods. Often, it just involves changing an import statement, but it can be more complicated. If you post an example of where you are getting the errors, you can get more specific advice.

Upvotes: 3

Related Questions