title: Why am I getting "could not find com.android.tools.build:gradle" error?
body: <p>This is based off my last <a href="https://stackoverflow.com/questions/30958596/how-to-resolve-low-sdk-build-tools-error">question</a>  as well.</p>
  
  <p>Following this <a href="https://github.com/MissionBit/mobile-game-dev/wiki/Push-Your-First-Android-Game" rel="nofollow noreferrer">tutorial</a>, I cloned the project into my machine and am trying to get the project to build properly.</p>
  
  <p>In the process of fixing the error I got in my last question, I encountered a new error. <Br />
  This is the section of the build script I am trying to fix/edit</p>
  
  <pre><code>buildscript {
       repositories {
           mavenCentral()
           mavenLocal()
           maven { url 'https://github.com/steffenschaefer/gwt-gradle-plugin/raw/maven-repo/' }
        }
        dependencies {
              classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.3'
              classpath 'com.android.tools.build:gradle:1.2.3'
        }
   }
  </code></pre>
  
  <p>Following the <a href="https://stackoverflow.com/questions/30054911/how-to-determine-the-version-of-gradle"> instructions</a> on how to check Gradle version, I checked mine and saw that I was running Gradle version 2.2.1. Based off that, I changed </p>
  
  <pre><code>    classpath 'com.android.tools.build:gradle:1.2.3'
  </code></pre>
  
  <p>to </p>
  
  <pre><code>   classpath 'com.android.tools.build:gradle:2.2.1'
  </code></pre>
  
  <p>However after changing that build script code, and attempting to rebuild my project, I get the above mentioned error(full stack trace below)</p>
  
  <pre><code>    Error:Could not find com.android.tools.build:gradle:2.2.1.
  Searched in the following locations:
      file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/2.2.1/gradle-2.2.1.pom
      file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/2.2.1/gradle-2.2.1.jar
      https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.1/gradle-2.2.1.pom
      https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.1/gradle-2.2.1.jar
      file:/C:/Users/chris/.m2/repository/com/android/tools/build/gradle/2.2.1/gradle-2.2.1.pom
      file:/C:/Users/chris/.m2/repository/com/android/tools/build/gradle/2.2.1/gradle-2.2.1.jar
      https://github.com/steffenschaefer/gwt-gradle-plugin/raw/maven-repo/com/android/tools/build/gradle/2.2.1/gradle-2.2.1.pom
      https://github.com/steffenschaefer/gwt-gradle-plugin/raw/maven-repo/com/android/tools/build/gradle/2.2.1/gradle-2.2.1.jar
  Required by:
      :theplanethatcouldntflygood:unspecified
  </code></pre>
  
  <p>Does anyone know why I am getting this error or how to fix this? It doesn't make sense for me to point the Java compiler(classpath) at a Gradle Version that I am not even using.</p>