i'm beginning to work in an old application which was developped with eclipse and actionbarsherlock. I need to import it to android studio and i'm having some issues that i can't resolve. When i try to import some errors pop like this one
Error:(2) Attribute "titleTextStyle" has already been defined
I've read that this is because actionbarsherlock and appcompat-v7 have conflicts and a solution could be to remove appcompat-v7 but i don't know how. This is my build gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "xxx"
minSdkVersion 14
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:18.0.0'
compile 'com.google.android.gms:play-services:+'
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile files('libs/adobeMobileLibrary-4.4.0.jar')
compile files('libs/AppMeasurement_Android.jar')
compile files('libs/google-play-services.jar')
compile files('libs/jackson-core-asl-1.9.13.jar')
compile files('libs/jackson-mapper-asl-1.9.13.jar')
compile files('libs/zbar.jar')
}
I see the appcompat-v7 in the external libraries but i don't know how to remove it.
Thank you so much for any help.
Try changing 'com.google.android.gms:play-services:+' to 'com.google.android.gms:play-services:7.0.0'. The newer versions of the Play Services library also declare 'titleTextStyle'. – FractalBob just now edit