Skip to content
Advertisement

How can I solve this new Firebase Auth error?

As normal I was working on my actual project and I wanted to add something new to an old activity. When I opened the .java file a new error has shown with a reason that I can not think about. It says that the FirebaseAuth symbol cannot be resolved. I checked my Gradle ( which is updated to the latest version) and the code but I can’t find a solution. I would really appreciate it if someone would help me.

A screenshot:

The Gradle module:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'

android {
compileSdkVersion 30
buildToolsVersion "30.0.3"

defaultConfig {
    applicationId "com.example.diligent"
    minSdkVersion 19
    targetSdkVersion 30
    versionCode 1
    versionName "1.0"
    multiDexEnabled true

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

    javaCompileOptions {
        annotationProcessorOptions {
            arguments += [
                    "room.schemaLocation":"$projectDir/schemas".toString(),
                    "room.incremental":"true",
                    "room.expandProjection":"true"]
        }
    }
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {

implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.core:core-ktx:1.3.2'

implementation "androidx.multidex:multidex:2.0.1"
implementation 'com.google.android.gms:play-services-ads:20.0.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.github.congtung10t2:circularseekbarplus:1.0'
implementation 'com.google.firebase:firebase-auth:20.0.4'
implementation 'com.google.firebase:firebase-database:19.7.0'
}

And Project:

buildscript {
repositories {
    google()
    mavenCentral()
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:4.1.2'
    classpath 'com.google.gms:google-services:4.3.5'

    classpath "com.google.gms:google-services:4.3.5"
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    google()
    jcenter()
    maven {
        url "https://jitpack.io"
    }
 }
 }

Advertisement

Answer

implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement