错误:属性"android:orientation"已定义



我在我的项目中添加了"viewpagerindicator"库和"com.android.support:gridlayout-v7:21.0.0"作为依赖项。它们都具有声明的"方向"属性
在 'viewpagerindicator' 函数库中,它写着 -

<declare-styleable name="CirclePageIndicator">
        <attr name="android:orientation"> 
    </declare-styleable>

我收到上述错误,如何解决此问题。

尝试在build.gradle上使用

compile 'fr.baloomba:viewpagerindicator:2.4.2'

查看更多详细信息,请访问 http://mvnrepository.com/artifact/fr.baloomba/viewpagerindicator/2.4.2

有了这个 .gradle 为我成功构建

apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
    applicationId "com.cooperbros.myapplication"
    minSdkVersion 9
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
  }
}   
dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.android.support:appcompat-v7:21.0.2'
  compile 'com.android.support:gridlayout-v7:21.0.0'
  compile 'fr.baloomba:viewpagerindicator:2.4.2'
}

最新更新