Okay, i know this question have been asked a lot.. And, i also have tried several methods posted in SO. But none seems to work for me.
So, here's how i do it. I add this line of code inside dependencies in my gradle files:
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
But then when i try to sync my project with gradle, it gives me these error:
Gradle invocation completed successfully with 75 error(s) in 30 sec
These are the errors:
D:\RandomProjects\SwipeExperiment\SwipeExperiment\build\exploded-aar\com.android.support\appcompat-v7\19.1.0\res\values\values.xml
Error:Attribute "titleTextStyle" has already been defined
Error:Attribute "subtitleTextStyle" has already been defined
Error:Attribute "divider" has already been defined
Error:Attribute "background" has already been defined
Error:Attribute "backgroundSplit" has already been defined
Error:Attribute "actionDropDownStyle" has already been defined
Error:Attribute "dropdownListPreferredItemHeight" has already been defined
Error:Attribute "popupMenuStyle" has already been defined
D:\RandomProjects\SwipeExperiment\SwipeExperiment\build\exploded-aar\com.actionbarsherlock\actionbarsherlock\4.4.0\res\values\values.xml
Error:Attribute "navigationMode" has already been defined
Error:Attribute "displayOptions" has already been defined
Error:Attribute "title" has already been defined
Error:Attribute "subtitle" has already been defined
Error:Attribute "icon" has already been defined
Error:Attribute "logo" has already been defined
Error:Attribute "backgroundStacked" has already been defined
.
.
.
Error:Attribute "windowActionBarOverlay" has already been defined
Error:Attribute "windowSplitActionBar" has already been defined
Error:Attribute "listPopupWindowStyle" has already been defined
Error:Attribute "activityChooserViewStyle" has already been defined
Your project depends on both appcompat-v7
and ActionBarSherlock
. They both provide the same functionality and define the same style attributes - which are conflicting.
Either remove ActionBarShelock
or appcompat-v7
library.
I recommend using ActionBar
from appcompat-v7
rather than ActionBarSherlock
.
Support library features. AppCompat
Adding the Action Bar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With