0

i am starter ind android, but when I install android studio and start to program, in first step, I see this error:

Gradle sync failed: Could not find com.android.tools.build:gradle:3.1.1.
            Searched in the following locations:
            https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.1/gradle-3.1.1.pom
            https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.1/gradle-3.1.1.jar
            https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.1/gradle-3.1.1.pom
            https://jcenter.bintray.com/com/android/tools/build/gradle/3.1.1/gradle-3.1.1.jar
            Required by:
            project :
            Consult IDE log for more details

and now what I must to do ?

Pavya
  • 6,015
  • 4
  • 29
  • 42
  • Add `build.gradle`. – ADM Apr 20 '18 at 10:56
  • 1
    Possible duplicate of [Could not find com.android.tools.build:gradle:3.0.0-alpha1 in circle ci](https://stackoverflow.com/questions/44071080/could-not-find-com-android-tools-buildgradle3-0-0-alpha1-in-circle-ci) – rckrd Apr 20 '18 at 10:56
  • Do you have a file named gradle-wrapper.properties? Please check and update. Also, show your project level build.gradle file code. – Kruti Parekh Apr 20 '18 at 10:58

1 Answers1

0

Use this distributionUrl in your gradle-wrapper.properties as this zip distributes 3.1.1 gradle plugin.

distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

I hope it will work for you.