title: Error:Execution failed for task ':app:dexDebug'... using android studio
body: <p>I am using this library <a href="https://github.com/mikepenz/MaterialDrawer" rel="nofollow">https://github.com/mikepenz/MaterialDrawer</a></p>
  
  <p>when I try run my project I get the following error:</p>
  
  <p><strong>Error:</strong></p>
  
  <blockquote>
    <p>Error:Execution failed for task ':app:dexDebug'.
    com.android.ide.common.process.ProcessException:
    org.gradle.process.internal.ExecException: Process 'command
    '/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java''
    finished with non-zero exit value 2</p>
  </blockquote>
  
  <p><strong>If I try use jdk1.7</strong></p>
  
  <blockquote>
    <p>Error:Execution failed for task ':app:dexDebug'.
    com.android.ide.common.process.ProcessException:
    org.gradle.process.internal.ExecException: Process 'command
    'C:\Program Files\Java\jdk1.7.0_45\bin\java.exe'' finished with
    non-zero exit value 2</p>
  </blockquote>
  
  <p><strong>Here is my build.gradle</strong></p>
  
  <pre><code>buildscript {
  repositories {
  maven { url 'https://maven.fabric.io/public' }
  }
  
  dependencies {
      classpath 'io.fabric.tools:gradle:1.+'
  }
  }
  apply plugin: 'com.android.application'
  apply plugin: 'io.fabric'
  
  repositories {
  maven { url 'https://maven.fabric.io/public' }
  }
  
  android {
  compileSdkVersion 22
  buildToolsVersion "22.0.1"
  
  defaultConfig {
      applicationId "com.test"
      minSdkVersion 14
      targetSdkVersion 22
      versionCode 1
      versionName "1.0"
  }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
  }
  
  productFlavors {
  }
  
  
  packagingOptions {
      exclude 'META-INF/DEPENDENCIES'
      exclude 'META-INF/NOTICE'
      exclude 'META-INF/LICENSE'
      exclude 'META-INF/LICENSE.txt'
      exclude 'META-INF/NOTICE.txt'
  }
  }
  
  dependencies {
  compile fileTree(dir: 'libs', include: ['*.jar'])
  compile 'com.android.support:appcompat-v7:22.1.1'
  compile 'com.android.support:recyclerview-v7:+'
  compile 'com.google.android.gms:play-services:7.5.0'
  compile 'com.google.code.gson:gson:2.3'
  compile 'com.mcxiaoke.volley:library:1.0.+'
  
  compile fileTree(dir: 'libs/httpclient', include: ['*.jar'])
  
  compile 'com.afollestad:material-dialogs:0.7.6.0'    
  compile 'com.blunderer:materialdesignlibrary:2.0.0'     
  compile 'com.github.navasmdc:MaterialDesign:1.5@aar'    
  
  
  //https://github.com/mikepenz
  compile('com.mikepenz:materialdrawer:3.1.2@aar') {
      transitive = true
  } 
  compile('com.mikepenz:aboutlibraries:5.0.7@aar') {
      transitive = true
  }
  
  
  compile('com.crashlytics.sdk.android:crashlytics:2.4.0@aar') {
      transitive = true;
  }
  }
  </code></pre>
  
  <p>I also tries these solutions, but it does not work:</p>
  
  <pre><code>defaultConfig {
          ...
          multiDexEnabled = true
      }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>dependencies {
  
  ...
      compile 'com.android.tools.build:gradle:1.1.2'   
  ...
  }
  </code></pre>