想要在应用

时间:2016-06-17 06:27:03

标签: android android-studio

我想添加' design'在我的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"或"设计"此文件中的库。

1 个答案:

答案 0 :(得分:0)

确保您没有任何名为attribute的{​​{1}}。

在我的情况下,自定义ProgressWheel导致了该问题,重命名为attr name并解决了问题。

有关详情,请参阅Attribute "barLength" has already been defined

相关问题