ActionBarsherlock和appcompat-v7之间的Android Studio冲突

时间:2015-08-09 20:17:00

标签: android eclipse android-studio actionbarsherlock appcompat-v7-r22.1

我开始使用eclipse和actionbarsherlock开发的旧应用程序。我需要将它导入到android studio,我有一些我无法解决的问题。 当我尝试导入一些像这样的错误弹出

错误:(2)属性" titleTextStyle"已定义

我已经读过这是因为actionbarsherlock和appcompat-v7存在冲突,解决办法可能是删除appcompat-v7,但我不知道如何。这是我的构建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')
}

我在外部库中看到appcompat-v7,但我不知道如何删除它。

非常感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

尝试将'com.google.android.gms:play-services:+'更改为'com.google.android.gms:play-services:7.0.0'。较新版本的Play服务库也声明了'titleTextStyle'。 - FractalBob刚刚编辑

相关问题