Import GitHub Viewpagerindicator project to Android Studio

Source: Internet
Author: User

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()    }}

App ' s Build.gradle:

compile ‘com.viewpagerindicator:library:[email protected]‘

To use Android-viewpagerindicator in Android Studio, you can ' t download it from Gradle. Instead, you must import the library as a "Existing Project" to your current one.

Follow these steps:

    • 1 Download source code from GitHub.

    • 2 in your Android Studio project:file, Project Structure, add (+ symbol), Import Existing project. Import just the folder called "Library", not the entire project (leave the import options as Android Studio suggests).

    • 3 If the "compilesdkversion" specified in your build.gradle doesn ' t match with the one specified in the Android-viewpageri Ndicator Project, change the second one. The same is the such as "minsdkversion" or even the current support library.直接将App‘s build.gradle里面的android{}内容复制到新导入的模块的build.gradle中

    • 4 ADD Android-viewpagerindicator Project as a dependency to your Build.gradle module:

      dependencies {compile project(‘:library‘)}
    • 5 Sync project with Gradle files.

Import GitHub Viewpagerindicator project to Android Studio

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.