Android:错误:(464)属性“dividerPadding”已经定义

时间:2016-05-31 11:00:12

标签: android android-studio android-viewpager android-gradle build.gradle

当我尝试调试我的appliaction时出现错误

错误:(464)属性“dividerPadding”已定义

的build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.3"

defaultConfig {
    applicationId "com.xxx.xx"
    minSdkVersion 11
    targetSdkVersion 22
    useLibrary  'org.apache.http.legacy'
}

buildTypes {
    release {
        minifyEnabled true
        proguardFiles 'proguard.cfg'
    }
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.google.code.gson:gson:2.2.2'
compile 'joda-time:joda-time:2.2'
compile files('libs/comscore.jar')
compile files('libs/FlurryAnalytics-5.3.0.jar')
compile files('libs/json-simple.jar')
compile 'com.lantouzi.wheelview:library:1.1.2'
compile project(path: ':pageStripLibrary')
}

添加“ pageStripLibrary ”后,我遇到了这个问题。 当我尝试调试appliaction时

    <declare-styleable name="PagerSlidingTabStrip">
    <attr format="color" name="indicatorColor"/>
    <attr format="color" name="underlineColor"/>
    <attr format="color" name="dividerColor"/>
    <attr format="dimension" name="indicatorHeight"/>
    <attr format="dimension" name="underlineHeight"/>
    <attr format="dimension" name="dividerPadding"/>
    <attr format="dimension" name="tabPaddingLeftRight"/>
    <attr format="dimension" name="scrollOffset"/>
    <attr format="reference" name="tabBackground"/>
    <attr format="boolean" name="shouldExpand"/>
</declare-styleable>

这行代码是在value.xml下自动生成的 构建&gt;中间&GT; RES&GT;合并&GT;调试和GT;值&GT; values.xml

1 个答案:

答案 0 :(得分:2)

请尝试从attrs.xml删除或评论(该文件位于项目'pageStripLibrary中的res/values/attrs.xml'):

    <attr format="dimension" name="dividerPadding"/>

因为它已由support:appcompat

定义