Android 要在应用程序中添加设计库吗

Android 要在应用程序中添加设计库吗,android,android-studio,Android,Android Studio,我想在我的android应用程序中添加“设计”库。简单地说,它添加和工作完美,但如果我添加设计库与我的应用程序的其他库,然后gradle文件给出错误 这是我的build.gradle文件: dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.android.support

我想在我的android应用程序中添加“设计”库。简单地说,它添加和工作完美,但如果我添加设计库与我的应用程序的其他库,然后gradle文件给出错误

这是我的build.gradle文件:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:design:23.0.1'
    compile files('libs/httpmime-4.1-beta1.jar')
    compile files('libs/httpcore-4.1.jar')
    compile files('libs/HockeySDK-3.5.0.jar')
    compile files('libs/apache-mime4j-core-0.7.2.jar')
    compile files('libs/oovoosdk.jar')
    compile 'com.google.android.gms:play-services-gcm:8.4.0'
    compile('com.paypal.sdk:paypal-android-sdk:2.14.2')
    compile 'com.google.android.gms:play-services-wallet:8.4.0'
    testCompile 'com.android.support.test.espresso:espresso-core:2.2.1'
    testCompile 'com.google.dexmaker:dexmaker-mockito:1.1'
    testCompile 'com.android.support.test.espresso:espresso-intents:2.2.1'
    testCompile 'com.android.support.test.espresso:espresso-web:2.2.1'
    testCompile 'com.android.support.test:runner:0.4.1'
    testCompile 'com.android.support.test:rules:0.4.1'
}
它给出了以下错误:

Error:(2) Attribute "buttonBarButtonStyle" has already been defined
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/ptiweb/adt-bundle-linux-x86-20140702/sdk/build-tools/23.0.1/aapt'' finished with non-zero exit value 1

请帮助我解决此问题。如何在此文件中添加“appcompat”或“design”库。

确保您没有任何名为
属性
“barLength”

在我的例子中,一个自定义ProgressWheel导致了问题,重命名为attr name,问题得到了解决


如需了解更多信息,请参阅

似乎重复,换句话说,已经有一个名为buttonBarButtonStyle的属性定义,因此无法避免使用重复的属性名称确保与您的版本匹配,targetSdkVersion和buildToolsVersion..在添加设计支持库之前更改现有样式名称是的,我更改了属性名称,然后它将成功运行