5

I got this error when I was creating new project. I tried to resolve but I couldn't find any solution.

halfer
  • 19,824
  • 17
  • 99
  • 186

1 Answers1

32

First: Add the following code to the top of your build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.2'
    }
} 

allprojects {
    repositories {
        jcenter()
    }
}

Second: Find the gradle-wrapper.properties. Change the last sentence to this:

distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip

Hope this works for you.

Nikhil PV
  • 1,014
  • 2
  • 16
  • 29