使用gradle构建时已经定义的错误

时间:2015-09-04 05:21:21

标签: android gradle android-appcompat

我从ANT向Gradle导入了一个旧项目。我包括所有库和tride构建但我有问题:

 E:\gradle\DriverClient\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-wallet\7.8.0\res\values\wallet_colors.xml
    Error:(2) Attribute "titleTextStyle" has already been defined
    Error:(2) Attribute "subtitleTextStyle" has already been defined
    Error:(2) Attribute "divider" has already been defined
    Error:(2) Attribute "background" has already been defined
    Error:(2) Attribute "backgroundSplit" has already been defined
    Error:(2) Attribute "navigationMode" has already been defined
    Error:(2) Attribute "displayOptions" has already been defined
  .............................

我不明白出了什么问题。这是我的Gradle依赖项 -

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
    compile 'com.larswerkman:HoloColorPicker:1.5'
    compile 'com.google.android.gms:play-services:7.8.0'
    compile 'org.jsoup:jsoup:1.8.3'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
}

2 个答案:

答案 0 :(得分:3)

无法一起使用appcompat库和ActionBarSherlock,因为他们使用相同的attrs。

我建议你使用appcompat库,因为abs was deprecated大约两年前,没有更新,也不属于mantenaince。

答案 1 :(得分:1)

尝试删除

compile 'com.google.android.gms:play-services:7.8.0'

希望有所帮助:)