Question

In my application i just want to use sliding menu and the Action bar which i should use is Sherlock Action bar.

I downloaded both the libraries. Sliding Menu

1: https://github.com/jfeinstein10/SlidingMenu and Sherlock Action bar

I am able to use both this libraries Separately. I need to use together in my application. So after searching i found that i have to do like this

Add ActionBarSherlock as a dependency to SlidingMenu Go into the SlidingActivities that i plan on using make them extend Sherlock__Activity instead of __Activity.

While i am adding the SAB to Sliding menu as dependency i am getting error like this in eclipse.

Found 2 versions of android-support-v4.jar in the dependency list,
but not all the versions are identical (check is based on SHA-1 only at this time).
All versions of the libraries must be the same at this time.
Versions found are:
Path: C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc        \JakeWharton-ActionBarSherlock-e5c2d1c\library\libs\android-support-v4.jar
Length: 271754
SHA-1: 53307dc2bd2b69fd5533458ee11885f55807de4b
Path: C:\Users\Kamalone\Downloads\SlidingMenu-master\SlidingMenu-master\library    \libs\android-support-v4.jar
Length: 385685
SHA-1: 48c94ae70fa65718b382098237806a5909bb096e

Jar mismatch! Fix your dependencies

So what should i do for this ??

After removing the lib file from the sherlockAB i am getting manuy errors like this

C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:6: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.Solid'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:10: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.Solid'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:12: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.Solid.Inverse'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:15: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.TabView'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:17: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabView'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabView.Inverse'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:22: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.TabBar'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:24: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabBar'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabBar.Inverse'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values\abs__styles.xml:101: error: Error: No resource found that matches the given name: attr 'android:textAllCaps'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:29: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.ActionBar.TabText'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:31: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabText'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:33: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionBar.TabText.Inverse'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:55: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Holo.Light.ActionMode.Inverse'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values\abs__styles.xml:328: error: Error: No resource found that matches the given name: attr 'android:textAllCaps'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:93: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Menu'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:96: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Title'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:98: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Title.Inverse'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:100: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Subtitle'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:102: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionBar.Subtitle.Inverse'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:104: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Title'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:106: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Title.Inverse'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:108: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Subtitle'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:110: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.ActionMode.Subtitle.Inverse'.
[2013-03-01 14:18:14 - SlidingMenuLibrary] C:\Users\Kamalone\Downloads\JakeWharton-ActionBarSherlock-4.2.0-0-g90939dc\JakeWharton-ActionBarSherlock-e5c2d1c\library\res\values-v14\abs__styles.xml:113: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Holo.Widget.PopupMenu'.
Was it helpful?

Solution

The first problem here is that they're using different versions of the support lib (android-support-v4.jars).

For the second problem, you have to use one of the Sherlock themes to get your project to run. ActionBarSherlock needs many definitions to get the action bar styled correctly. Thus it needs these styles and you have to use the ABS themes. You can use your own theme, of course, but you must use one of Sherlock’s themes as a base for yours. See the Sherlock theming guide for more information on this.

Change your AndroidManifest.xml file to use a Sherlock theme:

<application
   android:allowBackup="true"
   android:icon="@drawable/ic_launcher"
   android:label="@string/app_name"
   android:theme="@style/Theme.Sherlock.Light" >

   <!-- ... -->

</application>

OTHER TIPS

Just throw out 1 of the 2 android-support-v4.jars. Both libraries contain it cause they need it, but when you link the libraries together they automatically use each other's .jars too.

remove on of the android support librarys in SAB or SM, if you just use both in another project as librarys, remove both librarys from SAB and SM and add an android support library to your main project. The librarys will show a red x as in error but just ignore it. your app should compile normally.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top