Try to search your question here, if you can't find : Ask Any Question Now ?

Adding Firebase to flutter project, breaks the project

HomeCategory: stackoverflowAdding Firebase to flutter project, breaks the project
Avatarcraig asked 5 days ago

I followed several tutorials to add firebase to my flutter project. But no matter what I do, my project breaks with the same exact failure.

I tried creating new projects, and got the same exact failure.

For now, I followed this tutorial.

Right after changing the app level build.gradle file, I start to build my app. I use flutter run to run the app on my physical device.

Every single time, I get hit by the same exact error, and scouring on the internet, didn’t solve the issue, hence the question.

My Error:

* Error running Gradle:
ProcessException: Process "D:Projectsflutter_credsandroidgradlew.bat" exited abnormally:
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

* Where:
Build file 'D:Projectsflutter_credsandroidappbuild.gradle' line: 24

* What went wrong:
A problem occurred evaluating project ':app'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at

BUILD FAILED in 1m 58s
  Command: D:Projectsflutter_credsandroidgradlew.bat app:properties

Please review your Gradle project setup in the android/ folder.
Exited (sigterm)

The error is at line 24 of my app level build.gradle file. However, that is the line, I haven’t changed. Here is my build.gradle (app level)

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the file.")

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'

apply plugin: ''
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
    compileSdkVersion 28

    sourceSets { += 'src/main/kotlin'

    lintOptions {
        disable 'InvalidPackage'

    defaultConfig {
        // TODO: Specify your own unique Application ID (
        applicationId "com.sowingfiber.flutter_creds"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner ""

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug

flutter {
    source '../..'

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    testImplementation 'junit:junit:4.12'
    androidTestImplementation ''
    androidTestImplementation ''
apply plugin: ''
1 Answers
Best Answer
AvatarMatthias answered 5 days ago
Your Answer

8 + 4 =

Popular Tags

WP Facebook Auto Publish Powered By :