title: java.util.zip.ZipException: duplicate entry: org/apache/http/ConnectionClosedException.class
body: <p>I am getting error like this when i run the application.I am using HttpClient,HttpEntity,HttpResponse and HttpPost in my MainActivity..so i made some modifications to gradle file.After that i am getting error like this.</p>
  
  <pre><code>Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
  &gt; com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/http/ConnectionClosedException.class
  </code></pre>
  
  <p>i have also included multidex library and org.apache.http.legacy.jar in my app.but then also i am getting the same error.</p>
  
  <p><strong>build.gradle</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
  
  
      compileSdkVersion 23
      buildToolsVersion "23.0.2"
  
      defaultConfig {
          applicationId "com.example.test1"
          minSdkVersion 15
          targetSdkVersion 23
          multiDexEnabled true
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      testCompile 'junit:junit:4.12'
      compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
      compile 'org.apache.httpcomponents:httpcore:4.4.1'
      compile 'org.apache.httpcomponents:httpclient:4.5'
      compile 'com.android.support:appcompat-v7:23.2.0'
      compile 'com.android.support:multidex:1.0.1'
      compile files('libs/org.apache.http.legacy.jar')
      compile 'org.apache.httpcomponents:httpmime:4.5.1'
  }
  </code></pre>
  
  <p>I Know this question has been asked many times,but none of the solutions worked for me..
  Can anyone please help me to resolve this one.</p>