Error while compiling release build in Android Studio 3.0 RC2

后端 未结 6 1654
耶瑟儿~
耶瑟儿~ 2020-12-10 03:58

How can I fix this issues while compiling release build in Android Studio 3.0 RC2

Error:Error: commons-logging defines classes that conflict with cl

相关标签:
6条回答
  • 2020-12-10 04:40

    I fixed this with a clean/rebuild. Also be sure to have annotationProcessor 'com.github.bumptech.glide:compiler:4.2.0' in your gradle for Glide.

    dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    
    compile 'com.github.PhilJay:MPAndroidChart:v3.0.1'
    compile 'com.github.recruit-lifestyle:FloatingView:2.2'
    compile 'com.dropbox.core:dropbox-core-sdk:3.0.5'
    compile 'com.squareup.okio:okio:1.13.0'
    compile 'com.squareup.okhttp3:okhttp:3.9.0'
    compile 'com.github.bumptech.glide:glide:4.2.0'
    compile 'com.opencsv:opencsv:4.0'
    compile 'com.android.support:appcompat-v7:26.1.0'
    compile 'com.android.support:recyclerview-v7:26.1.0'
    compile 'com.android.support:cardview-v7:26.1.0'
    compile 'com.android.support:design:26.1.0'
    compile 'com.android.support:preference-v7:26.1.0'
    compile 'com.android.support:preference-v14:26.1.0'
    compile 'com.google.android.gms:play-services-vision:11.4.2'
    compile 'com.google.android.gms:play-services-places:11.4.2'
    
    annotationProcessor 'com.github.bumptech.glide:compiler:4.2.0'
    }
    
    0 讨论(0)
  • 2020-12-10 04:50

    Add to build.gradle located in app module

    configurations {
        all {
            exclude module: 'httpclient'
            exclude module: 'commons-logging'
        }
    }
    
    0 讨论(0)
  • 2020-12-10 04:55

    add to app/build.gradle

    configurations {
        all {
            exclude module: 'httpclient'
            exclude module: 'commons-logging'
        }
    }
    
    0 讨论(0)
  • 2020-12-10 05:00

    In my case I use this dependency:

    compile 'com.github.nkzawa:socket.io-client:0.3.0'
    

    The json is wrong. I changed

    implementation('com.github.nkzawa:socket.io-client:0.3.0',{
        exclude group:'org.json',module: 'json'
    })
    
    0 讨论(0)
  • 2020-12-10 05:03

    The same error i fixed by this piece of code...

    android {
    ...
    
    configurations {
        all {
            exclude module: 'httpclient'
            exclude module: 'json'
            exclude group: 'org.apache.httpcomponents'
        }
    }
    
    ...
    }
    
    0 讨论(0)
  • 2020-12-10 05:04

    In my case the first issue (commons-logging) was solved excluding it from opencsv import:

    implementation('com.opencsv:opencsv:4.5') {
        exclude group: 'commons-logging'
    }
    
    0 讨论(0)
提交回复
热议问题