1

I'm using android 2.3.3(on eclipse), I would like to add action bar to my project.

I've tried to add android support library V7 and got many errors like this:

[2013-08-12 16:42:36 - app name_1_1_1] C:\Program Files\Android\android-sdk\extras\android\support\v7\appcompat\res\values-v14\styles_base.xml:24: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar'.

Is it possible to add the support library or add different library for the action bar ?

Keng
  • 52,011
  • 32
  • 81
  • 111
joseRo
  • 1,337
  • 3
  • 18
  • 35
  • possible duplicate of [Android Action Bar](http://stackoverflow.com/questions/7214012/android-action-bar) – Master Mar 12 '14 at 16:58

5 Answers5

3

Read this tutorial from Android's official site. Action Bar Android You just need to include android-support-v7-appcompat.jar support jar in your project from your android-sdk-windows\extras\android\support\v7\appcompat\libs path on your disk. Then you can use ActionBar below API 11 in Android.

Official Android Tutorial is here: Action Bar Android Official Sherlock bar was creating issues for me then I got this solution.

Master
  • 2,945
  • 5
  • 34
  • 65
2

This may help you

Android actionbar how to add supporting library v7 appcompat for Eclipse

or try this one

Community
  • 1
  • 1
Hybrid Developer
  • 2,320
  • 1
  • 34
  • 55
2

There are two ways to go to do ActionBar for Android 2.3.3/API Level 10,

  1. You can use ActionBarCombat which is the support library version of Android; here is a detailed official tutorial http://android-developers.blogspot.com/2013/08/actionbarcompat-and-io-2013-app-source.html
  2. You can use 3rd party library which is ActionBarSherlock, also the usage is here http://actionbarsherlock.com/usage.html
Onur A.
  • 3,007
  • 3
  • 22
  • 37
1

Try Action Bar Sherlock. From their website:

The library will automatically use the native action bar when appropriate or will automatically wrap a custom implementation around your layouts. This allows you to easily develop an application with an action bar for every version of Android from 2.x and up.

Fortega
  • 19,463
  • 14
  • 75
  • 113
0

its because you set project build target below 4.0

try to change ur build target above 4.0

and don;'t worry,, it can run on 2.3.3 too