首页 > 解决方案 > 在模块 (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0 中发现重复的类 com.android.volley

问题描述


android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.ariacloud.monaria"
        minSdkVersion 22
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        configurations { all*.exclude module: 'volley-release' }
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility = 1.8
        targetCompatibility = 1.8
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    def recyclerview_version = "1.0.0"

    implementation "androidx.recyclerview:recyclerview:$recyclerview_version"
    // For control over item selection of both touch and mouse driven selection
    implementation "androidx.recyclerview:recyclerview-selection:$recyclerview_version"
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.2.0'
    implementation 'com.android.volley:volley:1.1.0'
    implementation 'dev.dworks.libs:volleyplus:0.1.4'
     implementation 'devlight.io:navigationtabbar:1.2.5'
   // implementation 'com.github.devlight.navigationtabbar:library:1.1.2'
    //compile "com.google.android.gms:play-services-location:11.6.0"
    implementation 'com.google.firebase:firebase-core:11.8.0'
    implementation 'com.google.firebase:firebase-messaging:11.8.0'
    implementation 'com.google.firebase:firebase-analytics:15.0.0'
    //implementation files('libs/volley.jar')
}
apply plugin: 'com.google.gms.google-services'

这是错误:

在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android .volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1 中找到重复的类 com.android.volley.Cache。 0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs: volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime 中发现重复类 com.android.volley.CacheDispatcher .jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android.volley。CacheDispatcher$1 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1. 0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com .android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley- 中发现重复的类 com.android.volley.ExecutorDelivery 1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android.volley.ExecutorDelivery$1 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs :volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android.volley。ExecutorDelivery$ResponseDeliveryRunnable 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1 .0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar ( com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley 中发现重复的类 com.android.volley.NetworkDispatcher -1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs :volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android.volley。在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0 ) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com .android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev. dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1 中找到重复的类 com.android.volley.RequestQueue .4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android.volley.RequestQueue在 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 模块中找到 $1 ) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar ( com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 中找到重复的类 com.android.volley.RequestQueue$RequestFinishedListener和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus 中找到重复的类 com.android.volley.Response$ErrorListener -0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android。 volley.Response$Listener 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley :1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime 中发现重复类 com.android.volley.ResponseDelivery。 jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev .dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android.volley.VolleyLog$MarkerLog 在模块 jetified- volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android .volley.VolleyLog$MarkerLog$Marker 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android. volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1 中发现重复类 com.android.volley.toolbox.AndroidAuthenticator .0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs: volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4 中找到重复的类 com.android.volley.toolbox.BasicNetwork -runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android.volley.toolbox。 ByteArrayPool 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0 ) 重复类 com.android.volley.toolbox.ByteArrayPool$1 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com。android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley 中找到重复的类 com.android.volley.toolbox.HttpClientStack -1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev .dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android.volley.toolbox.HttpHeaderParser 在模块 jetified- volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android .volley.toolbox.HttpStack 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley 中找到重复的类 com.android.volley.toolbox.HurlStack -1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev .dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android.volley.toolbox.ImageLoader 在模块 jetified- volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android .volley.toolbox.ImageLoader$1 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley :volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1 中找到重复的类 com.android.volley.toolbox.ImageLoader$2。 0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android.volley.toolbox.ImageLoader$3 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs :volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1 中发现重复类 com.android.volley.toolbox.ImageLoader$4 .4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android.volley。 toolbox.ImageLoader$BatchedImageRequest 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1 中找到重复的类 com.android.volley.toolbox.ImageLoader$ImageContainer .0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android.volley.toolbox.ImageLoader$ImageListener 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks .libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus- 中找到重复的类 com.android.volley.toolbox.PoolingByteArrayOutputStream- 0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0) 重复类 com.android.volley .toolbox.RequestFuture 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1.4) 和 volley-1.1.0-runtime 中找到。jar (com.android.volley:volley:1.1.0) 在模块 jetified-volleyplus-0.1.4-runtime.jar (dev.dworks.libs:volleyplus:0.1. 4) 和 volley-1.1.0-runtime.jar (com.android.volley:volley:1.1.0)


标签: androidandroid-volley

解决方案


似乎您有两个关于 volley 冲突的依赖项,因为它们都具有相同的类:

implementation 'com.android.volley:volley:1.1.0'
implementation 'dev.dworks.libs:volleyplus:0.1.4'

正如这里所说,您只需要一个:https ://developer.android.com/training/volley

implementation 'com.android.volley:volley:1.1.1'

所以,只需删除实现'dev.dworks ...'


推荐阅读