Mina Dahesh Mina Dahesh - 1 month ago 7
Android Question

importing ViewPagerIndicator in android stidio

I want to use ViewPagerIndicator in my app. So I need its library. I find these 2 links for downloading, Link1 and Link2.

But I don't know how can I add it to my project?

this is my build gradle file:

apply plugin: 'com.android.application'
android {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
maven { url "http://dl.bintray.com/populov/maven" }
jcenter()
mavenCentral()
}
compileSdkVersion 23
buildToolsVersion "23.0.1"

defaultConfig {
applicationId "standup.maxsoft.com.standup"
minSdkVersion 13
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {


compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.viewpagerindicator:library:2.4.1@aar'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.google.android.gms:play-services:8.3.0'
compile 'com.viewpagerindicator:library:2.4.1@aar'
compile 'com.google.android.gms:play-services-ads:8.3.0'
compile 'com.google.android.gms:play-services-identity:8.3.0'
compile 'com.google.android.gms:play-services-gcm:8.3.0'
}


I just copy 2 files in
libs.folder
. Would you please help me steplly? Thanks

Answer

I do it like this:

  1. Download the library from here
  2. Copy the file in libs folder of Android studio
  3. Add this line in your project gradle.build : compile project(':library-2.4.1')
Comments