Skip to content
Running man! edited this page Jan 3, 2017 · 13 revisions

Step 1. Add the JitPack repository in your build.gradle at the end of repositories:

repositories {
    maven { url "https://jitpack.io" }
}

Step 2. Add the dependency in the form

dependencies {
    compile 'com.github.Aspsine:SwipeToLoadLayout:1.0.4'

}

Assume you created an new Android studio project. Now your project's build.gradle should like this:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

And your module build.gradle shoud like this:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.aspsine.swipetoloadlayoutdemo"
        minSdkVersion 11
        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.android.support:appcompat-v7:23.1.1'
    compile 'com.github.Aspsine:SwipeToLoadLayout:1.0.3'
}

Step 3. Rebuild project.
This may take a minute. Be patient and wait building complete.
If you are in mainland of China, please use vpn.

We done here!

Clone this wiki locally