Error:Attribute "android:orientation" has already been defined

2.3k views Asked by At

I have added "viewpagerindicator" library and "com.android.support:gridlayout-v7:21.0.0" as a dependance in my project . Both of them has declare 'orientation' attribute
in 'viewpagerindicator' library its written -

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

I am getting the above error how I can resolve this.

2

There are 2 answers

5
gio On

Try to use at build.gradle

compile 'fr.baloomba:viewpagerindicator:2.4.2'

See more details at http://mvnrepository.com/artifact/fr.baloomba/viewpagerindicator/2.4.2

0
Stanislav Bondar On

With this .gradle build successfully for me

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'

}