title: java.util.zip.ZipException: duplicate entry: javax/inject/Inject.class
body: <p>I have seen similar responses to the below question. Sorry but i could not fixed it out trying multiple things so I am asking it again.
  Whenever I am trying to build my app, the gradle build throws me the below error stating ...due to duplicate entry of javax/Inject class.
  This only occurred when I am trying to put <code>compile 'org.glassfish.jersey.containers:jersey-container-jdk-http:2.9'</code> in my <code>build.gradle</code> file; This package is necessary for <code>javax.ws.rs.*</code> services.  </p>
  
  <p>I tried running the <code>gradlew clean</code> command in my root directory, it says that build is successful but when I am building my application again it started throwing the error again.
  Can you please help on the below error:</p>
  
  <pre><code>*Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
  &gt; com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: javax/inject/Inject.class*
  </code></pre>
  
  <p>Below is my app gradle file:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 23
      buildToolsVersion "23.0.3"
  
      defaultConfig {
          applicationId "com.usfca.studentrecordsverifycation"
          minSdkVersion 17
          targetSdkVersion 23
          versionCode 1
          versionName "1.0"
          // Enabling multidex support.
          multiDexEnabled true
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  repositories {
      maven { url 'http://repo1.maven.org/maven2' }
      maven { url 'http://maven.restlet.com' }
      maven { url 'https://maven.java.net/content/repositories/releases/' }
      maven { url 'http://download.java.net/maven/2/' }
      maven { url 'http://download.java.net/maven/1' }
  }
  dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
      testCompile 'junit:junit:4.12'
      compile 'com.android.support:appcompat-v7:23.3.0'
      compile 'com.android.support:design:23.3.0'
      compile 'com.android.support:multidex:1.0.1'
      compile 'log4j:log4j:1.2.17'
      compile 'com.google.code.gson:gson:2.2.4'
      compile 'com.madgag:sc-light-jdk15on:1.47.0.3'
      compile 'com.cloudinary:cloudinary-http44:1.4.5'
      compile 'org.glassfish.jersey.containers:jersey-container-jdk-http:2.9'
      compile 'commons-lang:commons-lang:2.6'
  }
  </code></pre>
  
  <p>Below is my Project gradle:</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:2.1.0'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>