skip to Main Content

this is the error i am encountering
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 org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.1.
Searched in the following locations:
https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.7.1/kotlin-gradle-plugin-1.7.1.pom
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.7.1/kotlin-gradle-plugin-1.7.1.pom
Required by:
project :

this is my build gradle

2

Answers


  1. Upgrade your Kotlin Version to

    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10"

    and then Run Flutter clean & Flutter pub get

    if you still face this issue then add this code to your allprojects section in build.gradle file.

    allprojects {
        configurations.all {
            resolutionStrategy {
                force "org.jetbrains.kotlin:kotlin-stdlib:1.7.10"
            }
        }
       .........
    }
    

    Basically it will ensure the correct Kotlin version is applied globally through your project.

    Login or Signup to reply.
  2. Updated Gradle

    Here is how you can update your gradle file in your project, if you still face any issue feel free to ask.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search