okhttp icon indicating copy to clipboard operation
okhttp copied to clipboard

Duplicate entry okhttp3/Address.class

Open Paul776 opened this issue 10 years ago • 4 comments

Hello,

I'm facing an issue

Error:Execution failed for task ':app:transformClassesWithJarMergingForLiteDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: okhttp3/Address.class

and sometimes

Error:Execution failed for task ':app:transformClassesWithJarMergingForLiteDebug'.

com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: okio/AsyncTimeout$1.class

The gradle file compile ('com.google.android.gms:play-services-maps:9.2.1') compile ('com.google.android.gms:play-services-location:9.2.1') compile ('com.android.support:appcompat-v7:23.2.1') compile ('com.android.support:design:23.2.1') compile ('joda-time:joda-time:2.9.4') compile ('com.google.firebase:firebase-ads:9.2.1') compile ('com.android.support:multidex:1.0.1') compile files('libs/Ajar-lib-usin-http3.jar') // this jar and okhttp 3.4.1 compile ('com.github.svarzee:gpsoauth-java:v0.2.0') uses okio 1.90 and 3.4.1

I have tried

compile ('com.github.svarzee:gpsoauth-java:v0.2.0'){ exclude group: 'com.squareup.okhttp3', module: 'okhttp' }

But I still get the same error.

Is this a bug with the lib or a something wrong with the way O use the libs ?

Thanks!

Paul776 avatar Jul 28 '16 09:07 Paul776

I'm getting the same error. Seeing you've closed this issue yourself, mind sharing what caused it/how you solved it?

mhmtk avatar Nov 18 '16 14:11 mhmtk

There must be more than one place have included the okhttp jar.

huaihong1986 avatar Dec 06 '16 07:12 huaihong1986

Did you get any solution @Paul776

shihabmi7 avatar Feb 07 '17 07:02 shihabmi7

any solutions?

cinder92 avatar Mar 21 '17 23:03 cinder92