Android Studion using Android-viewpagerindicator

Source: Internet
Author: User

Android-viewpagerindicator function does not introduce, want to see the click to see. Because not will not import, took a lot of time, now record, if just need, and just see, that reference.

1. Using MAVEN Import

1) Add the following code to the top-level build.gradle:

Buildscript {

repositories {

Maven {URL "Http://dl.bintray.com/populov/maven"}

Mavencentral ()

}

dependencies {

Classpath ' com.android.tools.build:gradle:0.12.+ '

}

}


allprojects {

repositories {

Maven {URL "Http://dl.bintray.com/populov/maven"}

Mavencentral ()

}

}


2) Add in your own app's Build.gradle

compile ' com.viewpagerindicator:library:2.4.1 '


Later you want to add a third-party library, only need to search in the http://search.maven.org/, and then add in the 2nd on the line.


2. Download the good source code and add the source code that has been downloaded:


#1 Download source code

#2 Import Existing Project, add (+ symbol), Project Structure, Android Studio project:file. K Just import the library folder instead of the entire project (leave the import options as Android Studio suggests).

# 3 Follow the steps set (SDK version), then next

# 4   Add dependency build.gradle  dependencies compile Project ': library ' }

注意:如果你项目中已经存在了support-v4,你需要删除,因为添加的 Android-ViewPagerIndicator 会包含这个库。在一个工程中不能有两个这样的库(工程会共用库中的这个jar)。如果Android-ViewPagerIndicator Library 中的support-v4 不能满足你的要求,那只能用第2种方法,下载好后,把你要的support-v4替换Library文件夹中的,然后按步骤进行。

Android Studion using Android-viewpagerindicator

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.