簡體   English   中英

Android:build.gradle錯誤(“無法解決”)

[英]Android: build.gradle error (“Failed to resolve”)

所以我試圖在這樣的選項卡中實現無限滾動: ViewPager作為循環隊列/包裝 這是github: https : //github.com/antonyt/InfiniteViewPager

我正在嘗試將依賴項添加到build.gradle中,但出現錯誤:“無法解決:com.antonyt。infiniteviewpager:library: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

該庫不在jcenter上-為此也有一張開放式票: https : //github.com/antonyt/InfiniteViewPager/issues/35

您可以在這里查看: https ://jcenter.bintray.com/com/-那里沒有anantyt

您可能要使用jitpack.io

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM