-1

I try to compile my project but I get these types of errors

"Error: (2) Attribute" titleTextStyle "has Already Been defined"

This is my Gradle

dependencies {
compile 'com.android.support:multidex:1.0.0'
compile project(':library')
compile project(':androidswitchbackport')
compile project(':urlImageViewHelper')
compile fileTree(include: ['*.jar'], dir: 'libs')
//compile 'com.android.support:appcompat-v7:21.+'
compile files('libs/FlurryAnalytics-4.2.0.jar')
compile('com.crashlytics.sdk.android:crashlytics:2.4.0@aar') {
    transitive = true;
}
//compile 'uk.co.chrisjenx:calligraphy:2.2.0'
compile 'com.android.support:support-v4:22.1.1'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile 'com.google.android.gms:play-services:8.1.0'
compile 'org.apache.commons:commons-collections4:4.0'
compile 'org.apache.commons:commons-lang3:3.1'
compile 'org.apache.httpcomponents:httpmime:4.3.3'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
compile 'com.loopj.android:android-async-http:1.4.7'
compile 'com.melnykov:floatingactionbutton:1.3.0'
compile 'org.apache.sanselan:sanselan:0.97-incubator'
compile 'com.cocosw:bottomsheet:1.+@aar'
compile 'org.lucasr.twowayview:twowayview:0.1.4'
compile 'com.viewpagerindicator:library:2.4.1'
compile 'joda-time:joda-time:2.4'
compile 'com.google.android.gms:play-services-ads:8.1.0'
compile 'com.google.android.gms:play-services-identity:8.1.0'
compile 'com.google.android.gms:play-services-gcm:8.1.0'
}

I have seen many questions and answers on this issue, but none has worked for me :(

miha
  • 3,287
  • 3
  • 29
  • 44
  • Kenny, please see the [help section](http://stackoverflow.com/help) on how to ask questions. As far as your question goes, you're probably having a duplicate `titleTextStyle` attribute defined in your project. Search through your file system or in your IDE (find in all files) to find out where it comes from. – miha May 04 '16 at 20:46
  • Post the logcat instead of the gradle file. It's not about the gradle, it's one of your xml files and the logcat will tell us which one. – Vucko May 04 '16 at 21:01
  • 1
    1) Make sure you're using the same version of support libs like `support-v4` and `appcompat-v7` *in all modules*. 2) Get rid of actionbarsherlock four years ago. – Eugen Pechanec May 04 '16 at 21:46
  • Can you be bothered to do a simple search with just the content of your error? – njzk2 May 04 '16 at 22:02

1 Answers1

-1

This isn't a problem with Gradle, or with your Gradle file.

Check your XML layout files and look for "titleTextStyle" (most likely in a TextView or some other widget). You most likely have a duplicate.

CaptJak
  • 3,592
  • 1
  • 29
  • 50
Rafal
  • 292
  • 2
  • 10