Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My flutter application android build.gradle file does not have Default config and application ID

    ext.kotlin_version = '1.6.10'
    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}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

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

This is my build.graddle file from my fresh flutter default app. How can i link the android aspect to firebase?

any resources with a recent date to this effect will be very much appreciated.

the problem i have with the code above is that their is no ApplicationID. I am thinking something is wrong with my build.graddle, which makes me question my installation of flutter or android studio or something.

like image 461
Vick Naija Avatar asked Oct 18 '25 14:10

Vick Naija


1 Answers

There is nothing wrong with your build.gradle. You're just looking into Root level of build.gradle file of android in your flutter project. You need to check into android/app/build.gradle.

There are two build.gradle file in an android project.

  1. android/build.gradle
  2. android/app/build.gradle (check here)

See the screenshot of my selected file and it's path.

enter image description here

like image 52
Priyanka Rawat Avatar answered Oct 21 '25 03:10

Priyanka Rawat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!