The binary version of its metadata is 1.7.1, expected version is 1.5.1. How to Solve?

Viewed 368

I connected firebase and I got this error, how can I fix it? (Class 'com.google.firebase.auth.ktx.AuthKt' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.7.1, expected version is 1.5.1.)

build.gradle

buildscript {
    ext {
        compose_version = '1.1.0-beta01'
    }

    dependencies {
        classpath 'com.google.gms:google-services:4.3.13'
    }
}// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id 'com.android.application' version '7.2.1' apply false
    id 'com.android.library' version '7.2.1' apply false
    id 'org.jetbrains.kotlin.android' version '1.5.31' apply false
}

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

Try downgrading kotlin version from 1.7.1 to 1.5.1. Your current version is causing the issue as firebase auth dependency is not compatible with your current kotlin version.

Related