I am using multiple firebase projects in an Android App. I am getting this error : Missing google_app_id. Firebase Analytics disabled

In my case the problem was with incomplete Firebase configuration.

I was missing

buildscript {
    ...
    dependencies {
        ...
        classpath 'com.google.gms:google-services:4.3.3' // google-services plugin
    }
}

allprojects {
    ...
    repositories {
        google()
    }
}

from build.gradle.

And

// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'

from app/build.gradle.


The issue could be due to instant app being enabled

Solution : Manually add google_app_id to the strings.xml file — as told here

enter image description here

Update : In case app crashes without any warning or error, try this (maven):

Go to project level build.gradle & check if it looks exactly like this:

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

and the code suddenly works and when you'll look at other answers you will find the same.


Could you double check if google-services.json is located at your Android app module root directory?

enter image description here

If it is there, make sure google-services.json has the mobilesdk_app_id key. It should be located under the client_info node.

 {
   ...,
   "client": [
     {
        "client_info": {
          "mobilesdk_app_id": "random_string",
          ...
        }
     }
   ]
 }