title: Gradle can not find google play dependency
body: <p>I try to repair the dependency to google play services in my android project. It already worked but now it is broken. I think this happened in between the Android Studio beta- and release-version.</p>
  
  <p>This is the dependency in the build.gradle file:</p>
  
  <pre><code>dependencies {
      compile 'com.google.android.gms:play-services:6.5.87'
  }
  </code></pre>
  
  <p>Android Studio was able to autocomplete the version string: '6.5.87' So I thought it knows how to solve the dependency. But it does not.. This is what I treid:</p>
  
  <ul>
  <li>reinstaled Android Studio (1.0.1) and the Android SDK</li>
  <li>used several play-service versions (incl. tried to use '+')</li>
  <li>tried to 'gradlew clean' the project</li>
  <li>installed almost everything from the Android SDK Manager. (incl. Google Repository and Android Support Repository)</li>
  <li>set all environment variables to the correct path</li>
  </ul>
  
  <p>But I still get this error if I try to do a gradle project sync: </p>
  
  <blockquote>
    <p>Error:Could not find com.google.android.gms:play-services:6.5.87.
    Searched in the following locations:
        file:/C:/Users/MyName/.m2/repository/com/google/android/gms/play-services/6.5.87/play-services-6.5.87.pom
        file:/C:/Users/MaName/.m2/repository/com/google/android/gms/play-services/6.5.87/play-services-6.5.87.jar
        <a href="https://repo1.maven.org/maven2/com/google/android/gms/play-services/6.5.87/play-services-6.5.87.pom">https://repo1.maven.org/maven2/com/google/android/gms/play-services/6.5.87/play-services-6.5.87.pom</a>
        <a href="https://repo1.maven.org/maven2/com/google/android/gms/play-services/6.5.87/play-services-6.5.87.jar">https://repo1.maven.org/maven2/com/google/android/gms/play-services/6.5.87/play-services-6.5.87.jar</a>
        <a href="https://oss.sonatype.org/content/repositories/snapshots/com/google/android/gms/play-services/6.5.87/play-services-6.5.87.pom">https://oss.sonatype.org/content/repositories/snapshots/com/google/android/gms/play-services/6.5.87/play-services-6.5.87.pom</a>
        <a href="https://oss.sonatype.org/content/repositories/snapshots/com/google/android/gms/play-services/6.5.87/play-services-6.5.87.jar">https://oss.sonatype.org/content/repositories/snapshots/com/google/android/gms/play-services/6.5.87/play-services-6.5.87.jar</a>
        <a href="https://oss.sonatype.org/content/repositories/releases/com/google/android/gms/play-services/6.5.87/play-services-6.5.87.pom">https://oss.sonatype.org/content/repositories/releases/com/google/android/gms/play-services/6.5.87/play-services-6.5.87.pom</a>
        <a href="https://oss.sonatype.org/content/repositories/releases/com/google/android/gms/play-services/6.5.87/play-services-6.5.87.jar">https://oss.sonatype.org/content/repositories/releases/com/google/android/gms/play-services/6.5.87/play-services-6.5.87.jar</a>
    Required by:
        code:android:1.0</p>
  </blockquote>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Gradle is searching in "file:/C:/Users/MyName/.m2/repository/" but it should use 
  "file:/C:/Users/MyName/AppData\Local\Android\sdk\extras\google\m2repository" .. I dont know why this is wrong and how to fix it.. </p>
  
  <p><strong>UPDATE 2</strong></p>
  
  <p>I fixed it using this workaround:</p>
  
  <pre><code>repositories {
      def androidHome = System.getenv("ANDROID_HOME")
      maven { url "$androidHome/extras/android/m2repository/" }
      maven { url "$androidHome/extras/google/m2repository/"}
  }
  </code></pre>
  
  <p>But I am not happy with it. Does anybody know whats wrong with my gradle?</p>