title: Build causing java.util.zip.ZipException: duplicate entry error
body: <p>Many seem to face this problem on Stackoverflow but non had the same problem and solution as I did.</p>
  
  <blockquote>
    <p>"Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
    com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/commons/collections/ArrayStack.class"</p>
  </blockquote>
  
  <p>Here is my build.gradle:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 25
      buildToolsVersion "26.0.1"
      defaultConfig {
          applicationId "com.example.hey"
          minSdkVersion 15
          targetSdkVersion 25
          versionCode 1
          multiDexEnabled true
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  repositories {
      mavenCentral()
  }
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
  
      compile 'com.facebook.android:facebook-android-sdk:[4,5)'
      compile 'commons-validator:commons-validator:1.4.1'
      compile 'com.android.support.constraint:constraint-layout:1.0.2'
      compile 'com.android.volley:volley:1.0.0'
      compile 'com.android.support:design:25.3.1'
      compile 'com.aurelhubert:ahbottomnavigation:2.0.6'
      testCompile 'junit:junit:4.12'
      //compile 'com.roughike:bottom-bar:2.3.1'
      //compile 'com.android.support:design:26.0.0-alpha1'
  }
  </code></pre>
  
  <p>I had this error:</p>
  
  <blockquote>
    <p>Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
    com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lorg/apache/commons/collections/Buffer;</p>
  </blockquote>
  
  <p>I fixed it using <code>multiDexEnabled true</code> but then the duplicate entry error showed up.</p>
  
  <p>EDIT:</p>
  
  <p>The problem was with <code>commons-validator:commons-validator:1.4.1</code> but I'm still curious onto why and how to fix this error to still be able to use the validator.</p>