A_Matar
A_Matar

Reputation: 2320

integrating Sherlock ActionBar-Build Using Gradle

I have just integrated SherlockActionBar in my android project but I am getting many Error:(1) Attribute "titleTextStyle" has already been defined errors when trying to build. The error refers me to colors.xml which is straight forward:

    <?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="blueDark">#2C3E50</color>
    <color name="blueLight">#00BD9C</color>
    <color name="white">#F9F9F9</color>
    <color name="themeOrange">#FF8040</color>
    <color name="themeGray">#ff8A9199</color>
    <color name="themeLightGray">#ffeaeaea</color>
    <color name="themeDarkGray">#ff3f434b</color>
    <color name="themeRed">#ffCC292B</color>
    <color name="themeBlue">#ff002E63</color>
    <color name="themeWhite">#ffffffff</color>
    <color name="buttonNormal">@color/themeGray</color>
    <color name="buttonPressed">@color/themeBlue</color>
</resources>

Also I got stuff like Can't resolve symbol R or the getActivity() method when using with fragments. Here is my build.gradle

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'me.dm7.barcodescanner:zxing:1.7.2'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'

}

I am working with package 22 so I didn't change it to 18 like what the documentation suggests, is this fine?

Upvotes: 0

Views: 174

Answers (2)

Kuffs
Kuffs

Reputation: 35661

ActionbarSherlock is no longer supported. There is now an official Google solution in the AppCompat Library. You should use that instead.

Upvotes: 1

Gabriele Mariotti
Gabriele Mariotti

Reputation: 363737

You can't use the appcompat and the actionbarsherlock together. These libraries define the same attrs.

Use the AppCompat Library, it is enough.

Upvotes: 2

Related Questions