Skip to content Skip to sidebar Skip to footer

Actionbarsherlock Gives Tons Of "call Requires Api Level 11 (current Min Is 7)" Errors

I downloaded ActionBarSherlock 4.0.3, unzipped it and created a new project from the library folder. The src folder was, according to Eclipse, full of errors, so I followed various

Solution 1:

Happened to me after running Lint checks. Try right click on sherlock action bar project -> Android tools -> Clear Lint Markers.

Solution 2:

Use ActivityCompat, provided in the support jar.

Solution 3:

Since you're using min API level 7, and invalidateOptionsMenu() did not exist until API level 11, you can't override it without errors since if the device runs API level 7, the function isn't even available in the base class and a non existing function cannot be overridden.

Solution 4:

All this answers are wrong Except dbrown0708 Answer but I will declare it more

You Can use invalidateOptionMenu in lower API by using ActivityCompat As it provided in support library v4

Syntax is invalidateOptionsMenu(Activity activity);

code is

ActivityCompat.invalidateOptionsMenu(this);

In API Since level 11

invalidateOptionsMenu();

Solution 5:

Try and use the import android.support.v4.app.Fragment; as your library

Post a Comment for "Actionbarsherlock Gives Tons Of "call Requires Api Level 11 (current Min Is 7)" Errors"