I got this error when I was creating new project. I tried to resolve but I couldn't find any solution.
Asked
Active
Viewed 5.0k times
5
-
2Possible duplicate: http://stackoverflow.com/q/24795079/4791726 – AlbAtNf Aug 04 '16 at 07:49
-
@AlbAtNf This thing I tried didn't worked. – Aug 04 '16 at 07:51
-
I don't know how you got an upvote for this - please always let us know _what_ you have tried, in detail. – halfer Aug 05 '16 at 08:33
1 Answers
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