title: How to avoid java.util.zip.ZipException in Android studio at build time
body: <p>Do not suggest to clean build or <code>./gredlew</code> clean solution already tried a lot.</p>
  
  <p>I simply want to avoid this error without excluding any jar file.</p>
  
  <p>Error details</p>
  
  <blockquote>
    <p>com.android.build.api.transform.TransformException:
    java.util.zip.ZipException: duplicate entry:
    android/support/v7/cardview/BuildConfig.class</p>
  </blockquote>
  
  <p>Here is my Build.gradle dependencies</p>
  
  <pre><code>dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
      testCompile 'junit:junit:4.12'
      compile project(':material')
      compile project(':cardViewLib')
      compile ('com.android.support:appcompat-v7:21.0.3') {
          exclude module: 'com.android.support/v7/cardview/BuildConfig.class'
      }
  } 
  </code></pre>