2

my Android Studio project does not load this is the problem:

Could not find com.android.tools.build:gradle:3.0.1. Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.jar

And my build.gradle is:

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


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

}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

please help, thank you

Ophy
  • 81
  • 1
  • 12
  • Did you opened AS in administrator mode then tried to open it in normal mode (if not, don't do it) ? This is know to be a problem, else it might just be due to an installation problem. – N.K May 15 '18 at 14:30

2 Answers2

2

Try replacing jcenter() with google() in repositories and allprojects->repositories blocks in build.gradle

ashazar
  • 714
  • 5
  • 11
0

Add both jcenter() and google() in repositories and allprojects->repositories blocks in build.gradle. Mine looks like this:

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

    }
}

This is very similiar to ashazar's answer. For me instead of replacing jcenter() with google(), I needed both jcenter() and google().

Zahra
  • 2,231
  • 3
  • 21
  • 41