title: Android Studio 0.8.6 Gradle project refresh failed, connection reset
body: <p>so, I've looked all over for a solution to this, and can't find one anywhere.</p>
  
  <p>Basically, when I open my project, Android Studio wants to sync the project by downloading Gradle and what not. No matter what I do, I always get: Gradle 'myapp' project refresh failed, Error: Connection reset.</p>
  
  <p>I'm not behind a proxy, my connection is fine. I've downloaded the gradle files manually but AS still wont sync because no cache exists, understandably.</p>
  
  <p>I had this problem in AS 0.8.0 as well, thought maybe updating might fix something.</p>
  
  <p>My build.gradle:</p>
  
  <pre><code>    apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 20
      buildToolsVersion "20.0.0"
  
      defaultConfig {
          applicationId "com.hiddensignal.myapplication"
          minSdkVersion 14
          targetSdkVersion 20
          versionCode 1
          versionName "1.0"
      }
      buildTypes {
          release {
              runProguard false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
  </code></pre>
  
  <p>Gradle wrapper:</p>
  
  <pre><code>#Wed Apr 10 15:27:10 PDT 2013
  distributionBase=GRADLE_USER_HOME
  distributionPath=wrapper/dists
  zipStoreBase=GRADLE_USER_HOME
  zipStorePath=wrapper/dists
  distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
  </code></pre>
  
  <p>another build.gradle from myapplication:</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:0.12.2'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  </code></pre>
  
  <p>These are all default values, which I assume should work.</p>
  
  <p>I've tried pretty much everything. Not sure if it's related, but I can't add new activities into my project, the drop down list is completely grayed out with a note that says (requires minSdk >= 7) on each of the items in the drop down menu.</p>
  
  <p>I'm tempted to downgrade AS in the hopes that an earlier version might finally connect and download the dependencies it needs, but I have doubts about that working.</p>
  
  <p>Does anyone see anything that could possibly be wrong with my files there? I've gone through countless threads and I've tried changing the repository, the dependencies, reimporting my project, etc...</p>
  
  <p>Any advice on what else I could try? I'm not behind any firewalls, SDK is fully updated. I have no idea what to do next, I'd really like to continue using AS but I might have to go back to Eclipse at this rate.</p>
  
  <p>Thanks for any help.</p>
  
  <p>Edit: Tried doing Build > Clean, got this error:</p>
  
  <pre><code>Error:A problem occurred configuring root project 'MyApplication'.
  &gt; Could not resolve all dependencies for configuration ':classpath'.
     &gt; Could not download artifact 'com.android.tools.build:gradle:0.12.2:gradle.jar'
        &gt; Connection reset
  </code></pre>