1

Hello I am following the material design course from Udacity when i downloaded the code they provide in Lessons but when i open it in Android it gives me that error

Error:Could not find com.android.tools.build:gradle:2.2.3.
Searched in the following locations:
    https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.pom
    https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.3/gradle-2.2.3.jar
Required by:
    :ApplyPaletteDemo:unspecified
Abd EL Magied
  • 141
  • 2
  • 9
  • Try [this](https://stackoverflow.com/questions/41570435/gradle-error-could-not-find-com-android-tools-buildgradle2-2-3/41570960) you will solve. – KeLiuyue Aug 16 '17 at 01:30

1 Answers1

0

Check that your build.gradle file for your project matches your version of Android Studio. It is possible that the project was written for an older version of Android Studio.

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

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven{
            url "http://maven.google.com"
        }
    }
}
Chad H.
  • 121
  • 1
  • 5
  • I made it but this error occure **Error:(1, 0) Minimum supported Gradle version is 3.3. Current version is 2.14.1. If using the gradle wrapper, try editing the distributionUrl in E:\ApplyPaletteDemo\gradle\wrapper\gradle-wrapper.properties to gradle-3.3-all.zip Open File** – Abd EL Magied Aug 16 '17 at 02:01
  • 1
    Download the last version from https://gradle.org/releases after that go to file/project structure/project and put the new version in gradle version – Chad H. Aug 16 '17 at 03:08
  • I Downloaded gradle version 4.1 and added the extracted folder in the .gradle file and open file/project structure / project and edited gradle version but it gave me same error I don't know the reason – Abd EL Magied Aug 16 '17 at 04:03
  • I changed the version of gradle from 2.3.3 to 2.2.3 and works correctly Thanks @Chad H for your support – Abd EL Magied Aug 16 '17 at 04:11