title: Android gradle google-services build failed "Duplicate Entry"
body: <p><strong>Edit:</strong></p>
  
  <p>I changed this line:</p>
  
  <pre><code>compile 'com.google.android.gms:play-services-analytics:8.1.0'
  </code></pre>
  
  <p>To:</p>
  
  <pre><code>compile 'com.google.android.gms:play-services-analytics:8.4.0'
  </code></pre>
  
  <p>I changed the classpath to be:</p>
  
  <pre><code>classpath 'com.google.gms:google-services:2.0.0-alpha7'
  </code></pre>
  
  <p>And updated the gradle version to 2.10 to fix the other issue I mentioned. Now I am having this error whenever I build:</p>
  
  <pre><code>Error:Execution failed for task ':app:processDebugGoogleServices'.
  </code></pre>
  
  <blockquote>
    <p>Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at <a href="https://bintray.com/android/android-tools/com.google.gms.google-services/" rel="nofollow noreferrer">https://bintray.com/android/android-tools/com.google.gms.google-services/</a>) or updating the version of com.google.android.gms to 8.3.0.</p>
  </blockquote>
  
  <p><strong>--------------------------------------------------------------------------------------------------------------------------</strong>  </p>
  
  <p><strong>Original Question</strong></p>
  
  <p>Out of nothing, my app wouldn't successfully build. I tried updating google-services and still I am getting an error.</p>
  
  <blockquote>
    <p>What went wrong:
    Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
    com.android.build.transform.api.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/ads/identifier/AdvertisingIdClient$Info.class</p>
  </blockquote>
  
  <p>I am also getting an error in my gradle, at the line:</p>
  
  <pre><code>    compile 'com.google.android.gms:play-services-analytics:8.1.0'
  </code></pre>
  
  <p>saying that some google libraries are of version 8.4.0 and some in 8.1.0. I tried upgrading the google library to 8.4.0. The gradle won't build and gives me the following error:</p>
  
  <pre><code>Warning:Gradle version 2.10 is required. Current version is 2.8. If 
   using the gradle wrapper, try editing the distributionUrl in 
  /Users/essam/Desktop/Apptuto/gradle/wrapper/gradle-wrapper.properties 
  to gradle-2.10-all.zip
  </code></pre>
  
  <p>Here is my gradle</p>
  
  <pre><code> // Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
  repositories {
      jcenter()
  }
  dependencies {
      classpath 'com.android.tools.build:gradle:1.3.0'
      classpath 'com.google.gms:google-services:1.4.0-beta3'
  
      // NOTE: Do not place your application dependencies here; they belong
      // in the individual module build.gradle files
  }
  }
  
  allprojects {
  repositories {
      jcenter()
  }
  }
  </code></pre>
  
  <p>The app gradle:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  apply plugin: 'com.google.gms.google-services'
  apply plugin: "findbugs"
  apply plugin: "pmd"
  android {
  android {
      useLibrary 'org.apache.http.legacy'
  }
  compileSdkVersion 23
  buildToolsVersion "23.0.2"
  defaultConfig {
      applicationId "my package name is written here"
      minSdkVersion 14
      targetSdkVersion 23
      versionCode 1
      versionName "1.1"
      multiDexEnabled true
  }
  
  buildTypes {
  
      release {
          minifyEnabled false
          shrinkResources false
      }
      debug {
          debuggable true
      }
  }
  
  
  }
  findbugs {
  ignoreFailures = true
  toolVersion = "2.0.1"
  reportsDir = file("$project.buildDir/reports/findbugs")
  effort = "max"
  }
  
  pmd {
  ignoreFailures = true
  reportsDir = file("$project.buildDir/reports/pmd")
  ruleSets = [
          "basic",
          "braces"
  ]
  }
  
  
  dependencies {
  compile('com.mikepenz:materialdrawer:4.3.7@aar') {
      transitive = true
  
  }
  repositories {
      mavenCentral()
      maven {
          url 'https://dl.bintray.com/intercom/intercom-maven'
      }
  }
  
  compile('io.intercom.android:intercom-sdk:1.+@aar') {
      transitive = true
  }
  compile 'com.android.support:appcompat-v7:23.1.1'
  compile 'com.pkmmte.view:circularimageview:1.1'
  compile 'com.facebook.android:facebook-android-sdk:4.0.0'
  compile 'com.github.bumptech.glide:glide:3.6.1'
  compile 'com.google.android.gms:play-services-analytics:8.1.0'
  compile 'org.apache.httpcomponents:httpclient:4.5'
  compile 'org.apache.httpcomponents:httpmime:4.2.3'
  compile 'com.mixpanel.android:mixpanel-android:4.6.4'
  compile 'info.hoang8f:android-segmented:1.0.6'
  compile 'com.android.support:design:23.1.1'
  compile 'com.android.support:multidex:1.0.1'
  compile 'com.android.support:support-v4:23.1.1'
  </code></pre>
  
  <p>}</p>