title: Unable to Merge Dex - Android Studio 3.0
body: <p>When I updated my Android Studio to 3.0 in the stable channel and ran the project, I started getting the below error.</p>
  
  <pre><code>Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
  com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
  </code></pre>
  
  <p>I tried cleaning and rebuilding the project, but it didn't work. Any help will be appreciated.</p>
  
  <p>Project level build.gradle</p>
  
  <pre><code>buildscript {
  repositories {
      jcenter()
      google()
  }
  dependencies {
      classpath 'com.android.tools.build:gradle:3.0.0'
      classpath 'com.google.gms:google-services:3.1.0'
  
  
      // NOTE: Do not place your application dependencies here; they belong
      // in the individual module build.gradle files
  }
  } 
  allprojects {
  repositories {
      jcenter()
      google()
  }
  }
  task clean(type: Delete) {
  delete rootProject.buildDir
  }
  </code></pre>
  
  <p>App level build.gradle</p>
  
  <pre><code>apply plugin: 'com.android.application'
  android {
  compileSdkVersion 26
  buildToolsVersion '26.0.2'
  defaultConfig {
      applicationId "com.med.app"
      minSdkVersion 21
      targetSdkVersion 26
      versionCode 1
      versionName "1.0"
      testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      resConfigs "auto"
      multiDexEnabled true
  
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  }
  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.android.support.constraint:constraint-layout:1.0.2'
  testCompile 'junit:junit:4.12'
  
  //appcompat libraries
  compile 'com.android.support:appcompat-v7:26.1.0'
  compile 'com.android.support:design:26.1.0'
  
  
  //butterknife
  compile 'com.jakewharton:butterknife:8.8.1'
  annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
  
  //picasso
  compile 'com.squareup.picasso:picasso:2.5.2'
  
  //material edittext
  compile 'com.rengwuxian.materialedittext:library:2.1.4'
  
  // Retrofit &amp; OkHttp &amp; and OkHttpInterceptor &amp; gson
  compile 'com.squareup.retrofit2:retrofit:2.3.0'
  compile 'com.squareup.retrofit2:converter-gson:2.3.0'
  compile 'com.google.code.gson:gson:2.8.2'
  compile 'com.squareup.okhttp3:logging-interceptor:3.8.0'
  
  // FirebaseUI for Firebase Auth
  compile 'com.firebaseui:firebase-ui-auth:3.1.0'
  }
  apply plugin: 'com.google.gms.google-services'
  </code></pre>
  
  <p>I have tried all the answers given but I am unable to solve this error. Please help.</p>