Android ActionBar Compatibility

I was looking at this sample package that Google provided using sdk. I tried to change the api level to 7 and noticed that there were a lot of unresolved errors in the project.

I will list a few here:

  • ICE_CREAM_SANDWICH cannot be enabled or is not a field (ActionBarActivity.java)
  • R cannot be resolved by a variable (perhaps this is due to the fact that my xml also contains errors)
  • SHOW_AS_ACTION_IF_ROOM cannot be enabled or is not a field (ActionBarHelperBase.java)
  • The setActionView (View) method is undefined for the MenuItem type (ActionBarHelperHoneycomb.java)
  • The getActionBar () method is undefined for the type Activity (ActionBarHelperICS.java)
  • Import android.view.ActionProvider cannot be allowed (SimpleMenuItem.java)
  • in res / values-v13 / styles.xml - error: error getting parent element: resource not found that matches the specified name 'android: style / TextAppearance.Holo.Widget.ActionBar.Title.
  • error: Error: A resource was not found that matches the specified name: attr 'android: actionBarStyle'. (in res / values-v11 / styles.xml)

Any idea how to get rid of these errors? I mainly target Android 2.x and later devices. Does actionbarsherlock use another alternative? I read here, on some post, that the action bar compatibility pack works with Android 2.x devices as well.

+5
source share
2 answers

api. min-sdk- 4, , 2.x. , api 14 .

+1

, Android node "". . API 14, Android 4.0. . , , , Android 2.3.3. AVD, 4.0.

+13

All Articles