title: Cannot update Gradle for Android to 2.13.0 to use ProtoBuf
body: <p>Hey I'm working on a project and I was trying to use the ProtoBuf Gradle Plugin. At first I was getting <a href="https://github.com/google/protobuf-gradle-plugin/issues/75" rel="nofollow noreferrer">this issue</a> because I currently have Gradle 2.10 installed so I followed the instructions here as well a</p>
  
  <p>According to <a href="https://stackoverflow.com/questions/34157716/android-studio-could-not-find-com-android-tools-buildgradle2-0-0-alpha2">this</a>, the Gradle files were moved to JCenter but when I followed the urls, I got a 404 response. I tried changing the distribution URL as in <a href="https://stackoverflow.com/a/34749866/6421112">this answer</a> and then invalidating the cache and restarting but that didn't fix it either. In frustration I deleted the stuff in the .gradle folder (trying to clear the cache) but that didn't work either and I haven't been able to get them back.</p>
  
  <p>I tried changing it to the default wrapper as an answer I can't find again suggested that didn't work. I tried downloading Gradle 2.13 on my own and placing it in the Android Studio directory but Windows 8 deleted it.</p>
  
  <p>The only thing I can think of is that this is my first time actually putting Gradle to use on this computer and I don't have admin rights. Earlier in the session, I closed out of an Admin Password request for something to do with the Java SE. I don't know how to undo that. Any help would be appreciated.</p>
  
  <p>Other answers I tried:</p>
  
  <p><a href="https://stackoverflow.com/a/34179425/6421112">https://stackoverflow.com/a/34179425/6421112</a> - Android Support Repository is installed fine.</p>
  
  <p><a href="https://stackoverflow.com/a/34749866/6421112">https://stackoverflow.com/a/34749866/6421112</a></p>
  
  <p>The error I'm getting is listed bellow, I had to censor the url part from the urls.  </p>
  
  <pre><code>Error:Could not find com.android.tools.build:gradle:2.13.0. Searched in the following locations:
  file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/2.13.0/gradle-2.13.0.pom
  file:/C:/Program Files/Android/Android Studio/gradle/m2repository/com/android/tools/build/gradle/2.13.0/gradle-2.13.0.jar
  %jcenter%/android/tools/build/gradle/2.13.0/gradle-2.13.0.pom
  %jcenter%/android/tools/build/gradle/2.13.0/gradle-2.13.0.jar Required by:
  :MyApplication:unspecified
  </code></pre>
  
  <p>Here's a stacktrace:</p>
  
  <pre><code>Required by:
      :BluetoothHeartbeat:unspecified
          at org.gradle.internal.resolve.result.DefaultBuildableComponentResolveResult.notFound(DefaultBuildableComponentResolveResult.java:38)
          at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.resolveModule(RepositoryChainComponentMetaDataResolver.java:88)
          at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.RepositoryChainComponentMetaDataResolver.resolve(RepositoryChainComponentMetaDataResolver.java:59)
          at org.gradle.api.internal.artifacts.ivyservice.resolveengine.ComponentResolversChain$ComponentMetaDataResolverChain.resolve(ComponentResolversChain.java:80)
          at org.gradle.api.internal.artifacts.ivyservice.clientmodule.ClientModuleResolver.resolve(ClientModuleResolver.java:44)
          at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$ModuleVersionResolveState.resolve(DependencyGraphBuilder.java:560)
          at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$ModuleVersionResolveState.getMetaData(DependencyGraphBuilder.java:570)
          at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$DependencyEdge.calculateTargetConfigurations(DependencyGraphBuilder.java:256)
          at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder$DependencyEdge.attachToTargetConfigurations(DependencyGraphBuilder.java:230)
          at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:137)
          at org.gradle.api.internal.artifacts.ivyservice.resolveengine.graph.DependencyGraphBuilder.resolve(DependencyGraphBuilder.java:75)
          at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver$1.execute(DefaultArtifactDependencyResolver.java:88)
          at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver$1.execute(DefaultArtifactDependencyResolver.java:78)
          at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
          at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:61)
          at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:39)
          at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver.resolve(DefaultArtifactDependencyResolver.java:78)
          at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.run(CacheLockingArtifactDependencyResolver.java:41)
          at org.gradle.internal.Factories$1.create(Factories.java:22)
          at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192)
          at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
          at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
          at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187)
          at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:64)
          at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:39)
          at org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver.resolve(DefaultConfigurationResolver.java:91)
          at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyConfigurationResolver.resolve(SelfResolvingDependencyConfigurationResolver.java:40)
          at org.gradle.api.internal.artifacts.ivyservice.ShortCircuitEmptyConfigurationResolver.resolve(ShortCircuitEmptyConfigurationResolver.java:52)
          at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolve(ErrorHandlingConfigurationResolver.java:43)
          at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveGraphIfRequired(DefaultConfiguration.java:371)
          at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveNow(DefaultConfiguration.java:346)
          at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:339)
          at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source)
          at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:664)
          ... 53 more
  
  
  BUILD FAILED
  
  Total time: 3.89 secs
  </code></pre>
  
  <p>Here's my <strong>build.gradle (MyApplication)</strong></p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
      repositories {
          jcenter()
          mavenCentral()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:2.13.0'
  
          classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.7'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p>And here's the other <strong>build.gradle</strong> (app):</p>
  
  <pre><code>apply plugin: 'com.android.application'
  //applyplugin: 'com.google.protobuf'
  
  android {
      compileSdkVersion 23
      buildToolsVersion "23.0.3"
  
      defaultConfig {
          applicationId "com.example.MyApplication"
          minSdkVersion 15
          targetSdkVersion 23
          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:23.4.0'
  }
  </code></pre>