Multiple dex files define Lorg/apache/http/impl/conn/AbstractClientConnAdapter;

Viewed 421

The problem:

Gradle error: "Multiple dex files define Lorg/apache/http/impl/conn/AbstractClientConnAdapter;"

The question:

The error message doesn't include much detail. Is there a way to find out which files it's referring to? How can I narrow this down? I'm hoping there's an easy way to do this.

What I've tried:

Putting this for each library in the Gradle file:

exclude module: 'org.apache.http.impl.conn.AbstractClientConnAdapter'

E.g.

    implementation (group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.5.2') {
        exclude module: 'org.apache.http.impl.conn.AbstractClientConnAdapter'
    }

However this doesn't seem to make a difference as I still get the error. I have a multi module project but I'm only running "assemble" on one module which I believe is the problem. There are only 4 library dependencies and no local jars for this module.

What am I not understanding about how "exclude works"? If they're all excluded then where is it coming from?

Other Info:

This is an Android project but the module I'm having the problem with is a pure Java module.

I'm using Android Studio 3.0.

p.s. what is the "L" before org in the error?

0 Answers
Related