-1
  • What went wrong: A problem occurred configuring root project 'android'.

Could not resolve all files for configuration ':classpath'. Could not find com.android.tools.build:gradle:7.2.2. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.2.2/gradle-7.2.2.pom - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.2.2/gradle-7.2.2.pom Required by: project :

  • Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

File build.gradle

buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:7.2.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

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

I don't know what to do

  • 1
    I know you're new and therefor I should be gentle, but you didn't explain anything - what did you do, what did you expect, what did you try yourself? Please read this: https://stackoverflow.com/help/how-to-ask for now a downvote – riffnl Nov 06 '22 at 23:53
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Nov 08 '22 at 20:23

1 Answers1

0

It's an access-related issue. You can try to check this link with your browser https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.2.2/gradle-7.2.2.pom

you can see that there is an error, and it's not accessible for you.

And there are multiple ways to gain access.

Here is an old answer of mine explaining how to set up a valid connection.

You can also use some VPNs like ProtonVPN, which will have a system-wide effect.

George
  • 2,292
  • 2
  • 10
  • 21