title: Android Studio 3.1 Execution failed for task: Error while merging dex archives
body: <p>android studio was getting build error while build execution with following </p>
  
  <blockquote>
    <p>Execution failed for task ':app:transformClassesWithMultidexlistForDebug'.
    com.android.build.api.transform.TransformException: Error while generating the main dex list.</p>
  </blockquote>
  
  <p>here is my gradle file where i am adding some jar dependency.</p>
  
  <p>App.gradle</p>
  
  <pre><code>android {
      compileSdkVersion 27
      defaultConfig {
          applicationId "com.example.demo"
          minSdkVersion 15
          targetSdkVersion 27
          versionCode 1
          versionName "1.0"
          multiDexEnabled true
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:27.1.1'
      testImplementation 'junit:junit:4.12'
      implementation files('libs/commons-codec-1.4.jar')
      implementation files('libs/commons-codec-1.9.jar')
      implementation files('libs/opencsv-2.4.jar')
      implementation files('libs/ormlite-android-4.46.jar')
      implementation files('libs/ormlite-core-4.46.jar')
      implementation files('libs/Pushwoosh.jar')
      implementation files('libs/StartAppInApp-2.3.2.jar')
  }
  </code></pre>
  
  <p>Project.gradle</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
          google()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.1.2'
      }
  }
  allprojects {
      repositories {
          jcenter()
          google()
      }
  }
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>