title: Error says Execution failed for task ':app:dexDebug' in android studio
body: <p>I am new in android programming and I use android studio IDE. I am trying to run a program but I face with this error: `Error:Execution failed for task ':app:dexDebug'.</p>
  
  <blockquote>
    <p>com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_45\bin\java.exe'' finished with non-zero exit value 2`</p>
  </blockquote>
  
  <p>I have searched a lot on the internet. There was a <a href="https://stackoverflow.com/questions/30001051/appdexdebug-execexception-finished-with-non-zero-exit-value-2/30028505#30028505">solution</a> which said: Try to remove your jar files one by one and then in each time build your project. So you can the jar file which caused the problem. But this couldn't help me.</p>
  
  <p>In another <a href="https://stackoverflow.com/questions/30320057/android-project-process-finished-with-non-zero-exit-value-2">solution</a>, I found that this i=may be because of duplication of names. I have checked all files and I didn't found any duplication.</p>
  
  <p>I found another <a href="https://stackoverflow.com/questions/29998783/java-exe-finished-with-non-zero-exit-value-2/30105605#30105605">solution</a> but I couldn't understand it.</p>
  
  <p>So, I'm getting confused what I should do. It is really annoying. </p>
  
  <p>Can anyone please help me to understand the problem.?
  Thanks in advance</p>
  
  <ul>
  <li>Sorry for my poor english</li>
  <li><p>By the way, this is build.gradle</p>
  
  <pre><code>apply plugin: 'com.android.application'
  android {
     compileSdkVersion 22
     buildToolsVersion "22.0.1"
  
     defaultConfig {
         applicationId "b.ir"
         minSdkVersion 14
         targetSdkVersion 22
         versionCode 1
        versionName "1.0"
      }
      buildTypes {
      release {
         minifyEnabled false
         proguardFiles getDefaultProguardFile('proguard-android.txt'),       'proguard-rules.pro'
       }
      }
      }
      dependencies {
           compile fileTree(include: ['*.jar'], dir: 'libs')
           compile 'com.android.support:appcompat-v7:22.1.1'
           compile files('libs/glide-3.3.1.jar')
           compile files('libs/okhttp-2.4.0.jar')
           compile files('libs/analytics-1.2.0.jar')
           compile files('libs/google-play-services.jar')
           compile 'com.google.android.gms:play-services:4.1.32'
           compile files('libs/mimecraft-1.1.1.jar')
           compile files('libs/library-1.2.2.jar')
           compile files('libs/com.google.android.maps.jar')
           compile 'com.google.android.exoplayer:exoplayer:r1.2.3'
           compile files('libs/realm-0.82.0.jar')
      }
  </code></pre></li>
  </ul>