首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Android appcompat lib + design lib = build error

Android appcompat lib + design lib = build error
EN

Stack Overflow用户
提问于 2015-08-08 15:43:41
回答 1查看 216关注 0票数 0

这是我的build.gradle

代码语言:javascript
复制
apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion '22.0.1'

    defaultConfig {
        applicationId "xxx"
        minSdkVersion 18
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.squareup.retrofit:retrofit:1.9.0'
    compile 'com.android.support:support-v4:22.0.0'
    compile 'com.android.support:cardview-v7:22.0.+'
    compile 'com.android.support:recyclerview-v7:22.2.1'
    compile 'com.android.support:design:22.2.0'
}

在添加此库之后

代码语言:javascript
复制
compile 'com.android.support:design:22.2.0'

我无法构建这个应用程序,因为我有以下错误:

代码语言:javascript
复制
/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.1/res/values/values.xml
    Error:(2) Attribute "rippleColor" has already been defined

能用这只小水晶鞋吗?

谢谢!路易斯

附注:我需要(目前) FloatingActionButton (fab)的设计库。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-08-08 17:34:55

看起来属性rippleColor不止一次被使用(依赖项和您自己的应用程序)。

检查xmls是否有一个名为"rippleColor“的属性,并查看它是否被多次使用。如果是的话,把它重命名为别的东西。

如果项目中有一个attr文件,请删除这一行:

代码语言:javascript
复制
<attr name="rippleColor" format="color" />
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/31895711

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档