rippleColor错误与com.android.support:design:23.0.0结合使用

时间:2015-09-07 15:53:10

标签: android dependencies android-gradle

当我添加设计支持库时,我面临此错误

/Users/NT/Documents/Android apps/AppName/app/build/intermediates/exploded-aar/com.google.android.gms/play-services-wallet/7.5.0/res/values/wallet_colors.xml
Error:(2) Attribute "rippleColor" has already been defined

这是我的代码

dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        compile 'com.android.support:multidex:1.0.1'
        compile 'com.google.android.gms:play-services:7.5.+'
        compile 'com.android.support:appcompat-v7:23.0.1'
        compile 'org.apache.httpcomponents:httpcore:4.2.4'
        compile 'org.apache.httpcomponents:httpmime:4.3'
        compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
        compile 'com.github.navasmdc:MaterialDesign:1.5@aar'
        compile 'com.facebook.android:facebook-android-sdk:4.5.0'
        complie 'com.android.support:design:23.0.0'
    }

我尝试删除Google Play服务

错误更改

/Users/NT/Documents/Android apps/Leaynik/app/build/intermediates/exploded-aar/com.github.navasmdc/MaterialDesign/1.5/res/values/values.xml
Error:(2) Attribute "rippleColor" has already been defined
生成构建文件夹下的

文件,不应编辑

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <!-- From: file:/Users/Navas/Desktop/Git/MaterialDesignLibrary/MaterialDesign/res/values/colors.xml -->
    <eat-comment/>
    <color name="green">#00FF00</color>
    <color name="thumbColor">#66aaaaaa</color>
    <declare-styleable name="CustomAttributes"><attr format="color|reference" name="rippleColor"/><attr format="float" name="rippleSpeed"/><attr format="boolean" name="showNumberIndicator"/><attr format="integer" name="max"/><attr format="integer" name="min"/><attr format="integer" name="value"/><attr format="integer" name="progress"/><attr format="dimension" name="ringWidth"/><attr format="boolean" name="check"/><attr format="dimension" name="checkBoxSize"/><attr format="dimension" name="thumbSize"/><attr format="integer" name="iconDrawable"/><attr format="dimension" name="iconSize"/><attr format="boolean" name="animate"/><attr format="float" name="rippleBorderRadius"/><attr format="boolean" name="clickAfterRipple"/></declare-styleable>
</resources>

enter image description here

1 个答案:

答案 0 :(得分:0)

这是您在依赖关系中使用的Material Design Libary的问题,如下所示:

compile&#39; com.github.navasmdc:MaterialDesign:1.5@aar'

请删除此库并尝试重新构建项目并检查是否已删除该错误,然后您需要管理另一个Material Design库。