程序类型已经存在:com.android.volley.Cache $ Entry

时间:2018-08-31 09:47:15

标签: android android-gradle

运行我的应用程序时,它返回此错误this error。通过搜索,我意识到我必须更改gradle文件中的依赖项,但是我不知道要更改什么。这是我的build.gradle文件:

dependencies {

implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:support-v4:27.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.sundeepk:compact-calendar-view:1.9.1'
implementation 'com.mcxiaoke.volley:library-aar:1.0.0'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.google.android.gms:play-services-location:10.2.4'
implementation 'com.android.support.constraint:constraint-layout:1.0.0-beta1'

 implementation 'com.android.volley:volley:1.0.0'
implementation 'com.jakewharton:butterknife:8.5.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
}

2 个答案:

答案 0 :(得分:1)

仅供参考

  

implementation 'com.mcxiaoke.volley:library-aar:1.0.0' DEPRECATED

从您的 dependencies

中删除 implementation 'com.mcxiaoke.volley:library-aar:1.0.0' 中的Build.Gradle

比您的项目 Clean-Re-Build-Run

编辑

Latest version is compile 'com.android.volley:volley:1.1.1'

答案 1 :(得分:0)

就像我下面那样排除排球,它将起作用

implementation ('com.google.android.libraries.places:places:2.1.0'){
    exclude group: 'com.android.volley'
}