Add github library as dependency to Android-Studio project

后端 未结 2 1274
我寻月下人不归
我寻月下人不归 2020-11-30 20:33

I am trying to implement ActionBar-PullToRefresh from https://github.com/chrisbanes/ActionBar-PullToRefresh/wiki/QuickStart-ABC. I just made the switch from Eclipse to Andro

相关标签:
2条回答
  • 2020-11-30 21:04

    It will work when you put this line in your project build.gradle, in the dependencies section:

    compile 'com.github.chrisbanes.actionbarpulltorefresh:extra-abc:+'
    

    Also, add:

    repositories {
        mavenCentral()
    }
    

    So:

    repositories {
        mavenCentral()
    }
    
    dependencies {
        compile fileTree(dir: 'libs', include: '*.jar')
        compile 'com.android.support:support-v4:18.0.+'
        compile 'com.android.support:appcompat-v7:18.0.+'
        compile 'com.github.chrisbanes.actionbarpulltorefresh:extra-abc:+'
    }
    

    Gradle will download the needed resources automatically for you.

    0 讨论(0)
  • 2020-11-30 21:06

    Use https://jitpack.io/

    allprojects {
        repositories { 
            jcenter()
            maven { url "https://jitpack.io" }
        }
    }
    dependencies {
        compile 'com.github.User:Repo:Tag'
    }
    
    0 讨论(0)
提交回复
热议问题