[英]Failed to resolve: com.mcxiaoke.volley:library:1.0.19 in Android Studio
I am trying to update my library for the project by adding following dependencies: 我正在尝试通过添加以下依赖项来更新项目的库:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.0'
compile 'com.android.support:design:23.2.0'
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile "com.android.support:appcompat-v7:22.1.1"
compile 'com.mcxiaoke.volley:library:1.0.19'
}
Unfortunately, I am getting error as: 不幸的是,我收到以下错误消息:
Error:(30, 13) Failed to resolve: com.mcxiaoke.volley:library:1.0.19 错误:(30,13)无法解决:com.mcxiaoke.volley:library:1.0.19
Error:(23, 17) Failed to resolve: junit:junit:4.12 错误:(23,17)无法解决:junit:junit:4.12
The problem occurred because you used jar file that is deprecated and no longer being maintained . 发生此问题的原因是您使用了不推荐使用的jar文件, 并且不再对其进行维护 。
Use this to include volley library: 使用它来包括排球库:
compile 'com.android.volley:volley:1.0.0'
instead of compile 'com.mcxiaoke.volley:library:1.0.19'
as volley dependency. 而不是将
compile 'com.mcxiaoke.volley:library:1.0.19'
为凌空依赖关系。
继续跟踪: https : //github.com/google/volley现在是:
compile 'com.android.volley:volley:1.1.0'
Add mavenCentral() at project level build gradle file ` 在项目级别的构建gradle文件中添加mavenCentral()
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.