2016-10-19 64 views
0

当我在我的依赖也会添加此库compile 'com.android.support:design:24.0.0',我得到了以下错误:我不能在Android Studio中添加此库:编译“com.android.support:design:24.0.0”

Information:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:compileDebugSources, :app:compileDebugAndroidTestSources, :app:compileDebugUnitTestSources] 
Error:(253) Original attribute defined here. 
C:\Users\Jamshidi\AndroidStudioProjects\School\School\app\build\intermediates\res\merged\debug\values\values.xml 
Error:(257) Attribute "rippleColor" already defined with incompatible format. 
Error:(257) Attribute "rippleColor" already defined with incompatible format. 
Error:(253) Original attribute defined here. 
Error:Execution failed for task ':app:processDebugResources'. 
> com.android.ide.common.process.ProcessException: Failed to execute aapt 
Information:BUILD FAILED 
Information:Total time: 26.882 secs 
Information:5 errors 
Information:0 warnings 
Information:See complete output in console 

如何我可以解决这个问题:

build.gradle文件包括以下内容:

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:24.0.0' 
    compile 'com.android.support:cardview-v7:24.0.0' 
    compile 'com.wrapp.floatlabelededittext:library:0.0.6' 
    compile 'com.github.navasmdc:MaterialDesign:[email protected]' 
    compile 'com.squareup.picasso:picasso:2.3.2' 
    compile 'com.nineoldandroids:library:2.4.0' 
    compile 'com.daimajia.slider:library:[email protected]' 
    compile 'com.android.support:support-v4:24.1.0' 
    compile 'com.baoyz.pullrefreshlayout:library:1.2.0' 
    compile 'com.android.support:design:24.0.0' 
+0

是您的SDK和构建工具更新? –

+0

是的,我想是不是SDK和工具的错误。它是错误:(257)属性“rippleColor”已用不兼容格式定义。 –

+0

尝试清理该项目。 –

回答

1

我想你说这个错误,因为'com.android.support:design:22.2.0''com.github.navasmdc:MaterialDesign:[email protected]' 库具有相同的属性rippleColor

为了解决这个矛盾,您可以:

  1. 克隆一个库(com.android.support:design:22.2.0com.github.navasmdc:MaterialDesign:[email protected]),重命名的属性,导入到项目中。
  2. thisthis或其他替换第三方库。
相关问题