title: Error while compling the android application - Execution failed for task :app:transformClassesWithDexForDebug
body: <p>My app was compiling properly, before i added an google maps activity. Then i get this error</p>
  
  <pre><code>FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':app:transformClassesWithDexForDebug'.
  &gt; com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-openjdk-amd64/bin/java'' finished with non-zero exit value 2
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  
  
  
  
  
  Error:The number of method references in a .dex file cannot exceed 64K.
  Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
  :app:transformClassesWithDexForDebug FAILED
  Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
  &gt; com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-openjdk-amd64/bin/java'' finished with non-zero exit value 2
  </code></pre>
  
  <p><strong>build.gradle</strong></p>
  
  <pre><code>android {
      compileSdkVersion 24
      buildToolsVersion "23.0.3"
      useLibrary 'org.apache.http.legacy'
  
      defaultConfig {
          applicationId "zupportdesk.desk.zupport.chatsystem"
          minSdkVersion 15
          targetSdkVersion 24
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      testCompile 'junit:junit:4.12'
  
      compile 'com.android.support:appcompat-v7:24.2.0'
      compile 'com.android.support:recyclerview-v7:24.2.0'
      compile 'com.android.support:design:24.2.0'
      compile 'com.android.support:cardview-v7:24.2.0'
      compile 'org.java-websocket:Java-WebSocket:1.3.0'
      compile 'com.google.android.gms:play-services:9.4.0'
      compile 'br.com.liveo:navigationdrawer-material:2.5.1'
  
  
  
      compile files('libs/gson-2.2.2.jar')
      compile files('libs/signalr-client-sdk-android.jar')
      compile files('libs/signalr-client-sdk.jar')
  
  }
  </code></pre>
  
  <p>Can someone help me to fix this issue. tnx</p>