Because it takes me a lot of time to integrate the Sherlock Action Bar in my Android project (with its map plugin !), I propose to depict here my solution.
Asked
Active
Viewed 3,894 times
4
-
Download the Google APIs and add the "maps.jar" to your "libs" folder. – Jared Burrows Jan 13 '13 at 17:35
1 Answers
6
First step consists to create a library project, second to create your own project that will use the Action Bar and third step enables to use the map plugin.
I - ActionBar SHerlock project :
- download the actionbarSherlock zip file
- import existing Android code into Workspace (for ActionBar 4.2.0). select the directory "library" to import. A "library" project is created.
- set your manifest with "android:minSdkVersion="7" android:targetSdkVersion="16"
- Import compatibility library: right click on the project > Android Tools > Add Support Library
configure this project with the following Project properties :
- android build target : >= android 4.0
- check "Is Library"
II - Your project :
- create your project that use Action Bar sherlock
- set Android Build Target to >= Android 4.0 (choose the same target than the previous project !)
- set your manifest with "android:minSdkVersion="7" android:targetSdkVersion="16"
- add the previous project "ActionBarSherlock" as a library : Project > Properties > Android > Add... (bottom panel)
- Change your code to use the ActionBar classes
III - To use the actionbarsherlock-plugin-maps-4.1.0.jar plugin of Action Bar Sherlock :
- add the actionbarsherlock-plugin-maps-4.1.0.jar (obtained from the zip file) to the project "ActionBarSherlock" in the libs directory
configure the project : project > properties > build path > Librairies :
- add actionbarsherlock-plugin-maps-4.1.0.jar
set the build target to Google map API >4.0 (do the same for your project - same target !)
- add the "actionbarsherlock-plugin-maps-4.1.0.jar" library to the new project’s build path
I Hope it will also work for you.

AntoineP
- 3,035
- 1
- 19
- 22
-
How should I remove the `android-support-v4.jar` from the build path? It is only listed as an item in `Android Dependencies`. I cannot remove the actual file from the `libs` folder since there are dependencies.. - When I setup an example project as you described I always end up with a `ClassNotFoundException` when I run the app. – JJD Jul 18 '12 at 15:22
-
also you need java set to 1.6 when compiling and change the compiler's option from Eclipse->preferences-> "Potential null pointer access" to Warning instead of Error – max4ever Jul 30 '12 at 13:57
-
I don't see that actionbarsherlock-plugin-maps-4.1.0.jar file in the zip file that I downloaded? – Alan Moore Oct 02 '12 at 01:35
-
This plugin is not included by default : http://actionbarsherlock.com/download.html – AntoineP Oct 24 '12 at 16:13