3

I have tried to sync an android project in android studio 3.6.1 now it shows the ERROR

Caused by: org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'.

AND

Caused by: org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.android.tools.build:gradle:3.6.1.

My gradle-wrapper.properties

#Sat Mar 14 13:13:04 IRST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

My build.gradle

// Top-level build file where you can add configuration options common to all 
sub-projects/modules.

buildscript {

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


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

allprojects {
repositories {
    google()
    jcenter()

}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
F_rad
  • 31
  • 5
  • Try my answer for this question: https://stackoverflow.com/questions/60681475/problem-with-grade-sync-in-android-studio/60681527?noredirect=1#comment107362149_60681527 – MMG Mar 14 '20 at 12:33
  • look this https://stackoverflow.com/questions/60545500/i-updated-the-android-studio-to-the-latest-version-3-6-1-and-gradle-plugin-is – Delly Fabian Lucas Mar 17 '20 at 17:59

0 Answers0