Android排球依赖

时间:2015-12-10 10:43:54

标签: java android android-volley

Volley的依赖关系似乎遇到了编译错误,我不确定为什么?这是我的依赖项代码和生成的错误消息。

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.mcxiaoke.volley:library-aar:1.0.0'
}

错误:配置项目':app'时出现问题。 >

 Could not resolve all dependencies for configuration ':app:_debugCompile'.
   > Could not resolve com.mcxiaoke.volley:library-aar:1.0.0.
     Required by:
         AndroidHive:app:unspecified
      > Could not resolve com.mcxiaoke.volley:library-aar:1.0.0.
         > Could not get resource 'https://jcenter.bintray.com/com/mcxiaoke/volley/library-aar/1.0.0/library-aar-1.0.0.pom'.
            > Could not GET 'https://jcenter.bintray.com/com/mcxiaoke/volley/library-aar/1.0.0/library-aar-1.0.0.pom'.
               > peer not authenticated

在尝试更新版本的Volley后,我现在收到了这个编译错误:

Error:(25, 13) Failed to resolve: com.mcxiaoke.volley:library:1.0.7

完整的构建文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.example.george.androidhive"
        minSdkVersion 8
        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.mcxiaoke.volley:library:1.0.19'
}

1 个答案:

答案 0 :(得分:3)

试试这个

compile 'com.mcxiaoke.volley:library:1.0.19'

<强>更新

此项目已被弃用。使用jCenter的官方版本

compile 'com.android.volley:volley:1.0.0'