title: Error:Execution failed for task ':app:dexDebug'
body: <p>I was trying to add Google Maps service in emulator in Android Studio for Mac. 
  I used <strong><a href="http://www.thedevline.com/2014/03/install-google-play-services-sdk-in.html" rel="nofollow">this</a></strong> to add google play services in my emulator and now I am getting this error.</p>
  
  <p>I also added Google play jar in "libs"</p>
  
  <p><strong>Build error</strong></p>
  
  <pre><code>Error:Execution failed for task ':app:dexDebug'.
  &gt; com.android.ide.common.internal.LoggedErrorException: Failed to run command:
              /Applications/Android Studio.app/sdk/build-tools/21.0.0/dx --dex --num-threads=4 --output /Users/BrijD/Desktop/Final_maps/app/build/intermediates/dex/debug /Users/BrijD/Desktop/Final_maps/app/build/intermediates/classes/debug /Users/BrijD/Desktop/Final_maps/app/build/intermediates/dependency-cache/debug /Users/BrijD/Desktop/Final_maps/app/build/intermediates/pre-dexed/debug/classes-0fd5fdfe526893278be8c195ce134eaf1d9f1e86.jar /Users/BrijD/Desktop/Final_maps/app/build/intermediates/pre-dexed/debug/classes-1c1ab6ce82c35aba8a1d88f2624cf1338444a247.jar /Users/BrijD/Desktop/Final_maps/app/build/intermediates/pre-dexed/debug/classes-3fa4a9ac8fa2216bad3a7f16c9a774b0dc355d43.jar /Users/BrijD/Desktop/Final_maps/app/build/intermediates/pre-dexed/debug/classes-8f6dc1447c1249308d36a8f93d1adf33837f8664.jar /Users/BrijD/Desktop/Final_maps/app/build/intermediates/pre-dexed/debug/internal_impl-21.0.0-fd4beb3682904051af27f723f6ba9423e4f00b8a.jar /Users/BrijD/Desktop/Final_maps/app/build/intermediates/pre-dexed/debug/support-annotations-21.0.0-ee576f91b45a6538d4156fc6e674b6f65034f74e.jar
            Error Code:
              2
            Output:
              UNEXPECTED TOP-LEVEL EXCEPTION:
              com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/actions/ReserveIntents;
                  at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
                  at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
                  at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
                  at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
                  at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
                  at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
                  at com.android.dx.command.dexer.Main.runMonoDex(Main.java:302)
                  at com.android.dx.command.dexer.Main.run(Main.java:245)
                  at com.android.dx.command.dexer.Main.main(Main.java:214)
                  at com.android.dx.command.Main.main(Main.java:106)
  </code></pre>
  
  <p><strong>AndroidMainefest.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="dormroomdevelopers.final_maps" &gt;
  
          &lt;uses-permission android:name="android.permission.INTERNET"/&gt;
          &lt;application
              android:allowBackup="true"
              android:icon="@drawable/ic_launcher"
              android:label="@string/app_name"
              android:theme="@style/AppTheme" &gt;
              &lt;activity
                  android:name=".MyActivity"
                  android:label="@string/app_name" &gt;
                  &lt;intent-filter&gt;
                      &lt;action android:name="android.intent.action.MAIN" /&gt;
  
                      &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
                  &lt;/intent-filter&gt;
              &lt;/activity&gt;
              &lt;activity android:name=".MapsActivity"&gt;
                  &lt;meta-data
                      android:name="com.google.android.maps.v2.API_KEY"
                      android:value="*****************************"/&gt;
              &lt;/activity&gt;
              &lt;meta-data android:name="com.google.android.gms.version"
                  android:value="@integer/google_play_services_version" /&gt;
          &lt;/application&gt;
  
      &lt;/manifest&gt;
  </code></pre>
  
  <p><strong>app build.gradle</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 21
      buildToolsVersion "21"
  
      defaultConfig {
          applicationId "dormroomdevelopers.final_maps"
          minSdkVersion 18
          targetSdkVersion 21
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              runProguard false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.google.android.gms:play-services:6.5.87'
      compile 'com.google.android.gms:play-services-maps:6.5.+'
  }
  </code></pre>
  
  <p><strong><em>proguard-rules.pro</em></strong></p>
  
  <pre><code>-keep class * extends java.util.ListResourceBundle {
      protected Object[][] getContents();
  }
  
  -keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
      public static final *** NULL;
  }
  
  -keepnames @com.google.android.gms.common.annotation.KeepName class *
  -keepclassmembernames class * {
      @com.google.android.gms.common.annotation.KeepName *;
  }
  
  -keepnames class * implements android.os.Parcelable {
      public static final ** CREATOR;
  }
  </code></pre>