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 :
2
Answers
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 inbuild.gradle
file.Basically it will ensure the correct Kotlin version is applied globally through your project.
Updated Gradle
Here is how you can update your gradle file in your project, if you still face any issue feel free to ask.