title: > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/commons/collections/ArrayStack.class
body: <p>I got exception as below when run the android application on android studio:</p>
  
  <pre><code>com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/commons/collections/ArrayStack.class
  </code></pre>
  
  <p>and find that  <strong>commons-beanutils-1.8.0.jar</strong> and <strong>commons-collections-3.2.1.jar</strong> which both contained same class (org/apache/commons/collections/ArrayStack.class) located at External Libraries of project.</p>
  
  <p>i don't know why these two jars included in here and my build.gradle as below:</p>
  
  <pre><code>`apply plugin: java
  
  sourceCompatibility = JavaVersion.VERSION_1_8
  targetCompatibility = JavaVersion.VERSION_1_8
  
  
  tasks.withType(JavaCompile){
      options.encoding="UTF-8"
  }
  
  repositories {
      mavenCentral()
      jcenter()
      mavenLocal()
  }
  
  dependencies {
  
  compile ('io.netty:netty-all:5.0.0.Alpha2')
  compile ('org.springframework:spring-core:4.2.4.RELEASE')
  compile ('org.springframework:spring-webmvc:4.2.4.RELEASE')
  compile ('org.springframework:spring-jdbc:4.2.4.RELEASE')
  compile ('org.springframework:spring-test:4.2.4.RELEASE')
  compile ('org.springframework:spring-context:4.2.4.RELEASE')
  compile ('org.springframework.data:spring-data-mongodb:1.8.2.RELEASE')
  compile ('org.springframework.security:spring-security-core:4.0.3.RELEASE')
  compile ('org.springframework.security:spring-security-web:4.0.3.RELEASE')
  compile ('javax.servlet:javax.servlet-api:3.1.0')
  compile ('org.mybatis:mybatis:3.3.0')
  compile ('org.mybatis:mybatis-spring:1.2.3')
  compile ('net.sf.json-lib:json-lib:2.4:jdk15')
  compile ('c3p0:c3p0:0.9.1.2')
  compile ('com.google.protobuf:protobuf-java:2.6.1')
  compile ('mysql:mysql-connector-java:5.1.38')
  compile ('org.mongodb:mongo-java-driver:3.2.0')
  compile ('org.slf4j:slf4j-log4j12:1.7.2')
  compile ('org.jasig.cas.client:cas-client-core:3.4.1')
  compile ('commons-httpclient:commons-httpclient:3.1')
  compile group: 'com.alibaba', name:'fastjson', version:'1.2.4'
  
  testCompile ( 'junit:junit:4.12')
  }`
  </code></pre>
  
  <p>How to resolve this exception and why the <strong>commons-beanutils-1.8.0.jar</strong> and <strong>commons-collection-3.2.1.jar</strong> download and located at External Libraries? Appreciate your help in advance.</p>