skip to Main Content

I was writing my code and didn’t touch any files of the project.
Then i wanted to start the app again and it shows me this error :

FAILURE: Build failed with an exception.

* 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:8.2.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/8.2/gradle-8.2.pom
       - https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/8.2/gradle-8.2.pom
     Required by:
         project : '

I tried many solutions in many websites but it didn’t work.

2

Answers


  1. Could you check your build.gradle file in android folder. At dependencies,
    I think you added build tools as classpath 'com.android.tools.build:gradle:8.2', there is no 8.2 version. try it with 7.1.2

    Login or Signup to reply.
  2. try this in Main project gradle file

    dependencies {
          classpath 'com.android.tools.build:gradle:7.2.2'
    }
    

    put this line in gradle-wrapper-properties

    distributionUrl=https://services.gradle.org/distributions/gradle-7.5-all.zip
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search