title: Gradle retrofit failed to resolve
body: <p>This is my first time trying to use gradle with an android project. I would like to add retrofit to my project but it keeps telling me.</p>
  <blockquote>
  <p>Failed to resolve: com.squareup.retrofit:retrofit:1.9.0</p>
  <p>Failed to resolve: com.squareup.okhttp:2.2.0</p>
  </blockquote>
  <p>However google play services works perfectly.</p>
  <p>My gradle file is as follows:</p>
  <pre><code>apply plugin: 'com.android.application'
  
  android {
    compileSdkVersion 21
    buildToolsVersion &quot;21.1.2&quot;
  
    defaultConfig {
      applicationId &quot;test.gradel&quot;
      minSdkVersion 14
      targetSdkVersion 21
      versionCode 1
      versionName &quot;1.0&quot;
   }
   buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
      }
   }
  }
  
  dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.google.android.gms:play-services:6.5.87'
    compile group: &quot;com.squareup.retrofit&quot;, name: &quot;retrofit&quot;, version: &quot;1.9.0&quot;
    compile group: &quot;com.squareup.okhttp&quot;, name: &quot;okhttp&quot;, version: &quot;2.2.0&quot;
  }
  
  buildscript {
    repositories {
      jcenter()
    }
  
    dependencies {
      classpath 'com.android.tools.build:gradle:1.1.2'
    } 
  }
  </code></pre>
  <p>Any help would be greatly appreciated.</p>
  <p>Thanks</p>