I was trying to put firebase in my project and then I was following a video, then this happened.
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
at first it said that I need a newer version of kotlin and so I changed the version then that happened
I tried to change some codes but it doesn’t work
this is the android build gradle code
buildscript {
ext.kotlin_version = '1.7.1'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.google.gms:google-services:4.4.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.1"
}
}
this is the dependencies in app build gradle
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation(platform("com.google.firebase:firebase-bom:32.8.1"))
implementation("com.google.firebase:firebase-analytics")
}
and my plugins
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
apply from: "dev.flutter.flutter-gradle-plugin"