2016-10-19 23 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或其他替換第三方庫。
相關問題