0

I'm making a Reddit app using the jReddit wrapper and I'm having trouble with the apache http client throwing the above exception. My dependencies look like this:

dependencies

and my libraries look like this:

libs

I have seen other questions on SO regarding similar exceptions, with people saying they may have two of the same jars in their classpath, but I am yet to find an answer which provides me with a solution of how to check for or eliminate duplicate/deprecated jars. Does anyone know how to solve this? Any help greatly appreciated, thanks.

1
  • did you try adding compile('com.github.jreddit:jreddit:1.0.2') { exclude group: 'org.apache.httpcomponents', module: 'httpclient' } like you did for junit dependency? Commented Mar 10, 2015 at 17:02

1 Answer 1

2

Disclaimer: I am the current maintainer for jReddit project.

We recently released a new version of the jreddit library, which is 1.0.3.

Can you try changing your dependencies to this?

dependencies {
    compile('com.github.jreddit:jreddit:1.0.3') {
        exclude group: 'org.apache.httpcomponents', module: 'httpclient'
        exclude module: 'junit'
    }
    compile 'org.apache.httpcomponents:httpclient-android:4.3.5.1'
    compile 'com.android.support:appcompat-v7:22.0.0'
}

Also, I've explained in another question regarding an android example. Check out this guy

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.