Android:build.gradle错误("无法解决")

时间:2015-10-19 15:55:04

标签: android

所以我试图在标签中实现无限滚动,如下所示:ViewPager as a circular queue / wrapping。这是github:https://github.com/antonyt/InfiniteViewPager

我正在尝试将依赖项添加到build.gradle但是我收到错误:"无法解决:com.antonyt。 infiniteviewpager:库:1.0.0。你知道我怎么解决这个问题吗?我尝试了清理项目并使缓存/重启无效。

这是我的build.gradle

apply plugin: 'com.android.application'

 android {
compileSdkVersion 21
buildToolsVersion "21.1.1"

defaultConfig {
    applicationId "com.example.mariogp18.tanga"
    minSdkVersion 16
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:support-v4:21.0.3'
compile 'com.antonyt.infiniteviewpager:library:1.0.0'
}

这是我的另一个build.gradle

// Top-level build file where you can add configuration options common to all sub-projects/modules.

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

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

这是我的代码:https://www.dropbox.com/s/ipe4zz1u3r0lnqt/App.zip?dl=0

1 个答案:

答案 0 :(得分:0)

这个库不在jcenter上 - 还有一个打开的票证:  https://github.com/antonyt/InfiniteViewPager/issues/35

你可以看一下:https://jcenter.bintray.com/com/ - 没有反抗

你可能想使用jitpack.io然后