FirebaseApp still fails even after removing from gradle

Issue

Running Gradle task ‘assembleDebug’…

F/FirebaseApp(23028): Firebase API initialization failure.

every time I compile the error appears.

tried

flutter clean
tried going to every gradle file and removing firebase(did not find anything).

search for string firebase on any text file in the folder and found nothing.

how to remove firebase from the build?

version android studio artic force
flutter 61.2.2
dart 203.8452

Solution

i changed the gradle, however the marge from the suggested answer was too complex for me.
so the gradle build from the example was helpfult and used that .

buildscript {
    ext.kotlin_version = '1.3.50'
    repositories {
        google()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
    project.evaluationDependsOn(':app')
}

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

Answered By – none

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published