使用 gradle 构建时已定义错误
Already Defined Error when building with gradle
我从 ANT 导入了一个旧项目到 Gradle。我包含了所有库和 tride 构建,但我有问题:
E:\gradle\DriverClient\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-wallet.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'
}
您不能同时使用 appcompat 库和 ActionBarSherlock,因为它们使用相同的属性。
我建议你使用 appcompat 库 自从 abs was deprecated 大约两年前,没有更新和维护。
尝试删除
compile 'com.google.android.gms:play-services:7.8.0'
希望对您有所帮助:)
我从 ANT 导入了一个旧项目到 Gradle。我包含了所有库和 tride 构建,但我有问题:
E:\gradle\DriverClient\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-wallet.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'
}
您不能同时使用 appcompat 库和 ActionBarSherlock,因为它们使用相同的属性。
我建议你使用 appcompat 库 自从 abs was deprecated 大约两年前,没有更新和维护。
尝试删除
compile 'com.google.android.gms:play-services:7.8.0'
希望对您有所帮助:)