flutterbuild.gradleflutter-android

How to setup Firebase distribution in a flutter app


I'm trying to add firebase distribution to my flutter app following these instructions

Everything is file until I get to step 3.b which says "In your module (app-level) Gradle file (usually //build.gradle), add the Google services plugin".

I can't figure out what "app-module" refers to or where the path to the gradle file is. If I append it to the /android/app/build.gradle the build crashes. Can somebody please tell me exactly which file and where to paste this content? There is no similar pattern for plugins anywhere.

plugins {
    id 'com.android.application'

    // Add the Google services Gradle plugin
    id 'com.google.gms.google-services'
    ...
}

Solution

  • Add Just Like this in buid.gradle,

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