1

當我嘗試調試我appliaction我得到一個錯誤安卓:錯誤:(464)屬性「dividerPadding」已被定義

錯誤:(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」 本次發行後。 當我嘗試調試

<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下 構建automaticaly產生的appliaction>中間> RES>合併>調試>值> values.xml

+0

你在res中有id.xml文件嗎? –

+0

,當我嘗試調試時,該文件生成的路徑爲「Health \ build \ intermediates \ res \ merged \ debug \ values」。在值文件夾下,我只有value.xml沒有其他文件。 @M D –

回答

2

請,嘗試刪除或從您的評論attrs.xml(該文件是在項目res/values/attrs.xml「pageStripLibrary」):

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

,因爲它的ALR eady由support:appcompat定義