Skip to content
This repository has been archived by the owner on Jul 25, 2019. It is now read-only.

commons-logging httpclient issues with Android Studio 3 #259

Open
nserror opened this issue Oct 30, 2017 · 2 comments
Open

commons-logging httpclient issues with Android Studio 3 #259

nserror opened this issue Oct 30, 2017 · 2 comments

Comments

@nserror
Copy link

nserror commented Oct 30, 2017

Updated to Android Studio 3 and now I cannot build for release. Fails with following errors in app.gradle at uservoice compile lines

Error:(115) Error: commons-logging defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]
Error:(117) Error: httpclient defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]

Line of code in question:

compile('com.uservoice:uservoice-android-sdk:1.2.+') {
        exclude module: 'commons-logging'
        exclude module: 'httpcore'
        exclude module: 'httpclient'
    }
@nserror
Copy link
Author

nserror commented Oct 31, 2017

I had to add the following to my build.gradle to fix this

configurations {
    all {
        exclude module: 'httpclient'
    }
}

@austintaylor
Copy link
Contributor

I can't reproduce your issue. What version are you using? We switched to okhttp in 1.2.5.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants