提问者:小点点

在模块(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'

null



共1个答案

匿名用户

看来您有两个关于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...”