25
votes

As per new version of Firebase Crashlytics added in Our App and application stopped at launch time.

java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.IllegalStateException: The Crashlytics build ID is missing. This occurs when Crashlytics tooling is absent from your app's build configuration. Please review Crashlytics onboarding instructions and ensure you have a valid Crashlytics account.

App-Level Gradle apply plugin: 'com.google.firebase.crashlytics'

implementation 'com.google.firebase:firebase-crashlytics:17.1.1'

Project-Levle Gradle classpath 'com.google.gms:google-services:4.3.3' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'

Follow steps by step from Firebase guides Firebase Guides

But earlier Fabric version is too much better than current one.

Any help will be appreciated.

6
Having the same issue. Will post solution here once I figure it outPeter
This bug is annoying. We have it and I have done everything to help fixing it but no luckseyed Jafari

6 Answers

32
votes

In the build.gradle at the application level, add the following imports
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

Then, in the gradle/wrapper/gradle-wrapper.properties file, upgrade your gradle version to 5.6.4
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

I used to run my app with gradle 5.1.1 and upgrading to the version 5.6.4 fixed my problems

I hope it'll help you !

10
votes

If anyone still have problem with this issue, try using crashlytics gradle verions 2.1.1 in project level gradle. I solved my problem by doing so.

buildscript {       
    ...
    dependencies {
        ... 
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.1'    
    }
}
9
votes

That normally happens when the plugin apply plugin: 'com.google.firebase.crashlytics' is missing in build.gradle app level.

5
votes

please add

 classpath 'com.google.firebase:firebase-crashlytics-gradle:x.x.x'

to your project's build gradle. And don't forget to add following lines to your app's build gradle

plugins {
    id 'com.android.application'
    id 'com.google.gms.google-services'
    id 'com.google.firebase.crashlytics'
}
1
votes

It will also happen if you forgot to include classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1' in your project level build.gradle

buildscript {
    repositories {
        // Check that you have Google's Maven repository (if not, add it).
        google()
    }

    dependencies {
        // ...

        // Check that you have the Google services Gradle plugin v4.3.2 or later
        // (if not, add it).
        classpath 'com.google.gms:google-services:4.3.8'

        // Add the Crashlytics Gradle plugin
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.7.1'
    }
}

allprojects {
    repositories {
        // Check that you have Google's Maven repository (if not, add it).
        google()
    }
}
0
votes

add this line

implementation "com.google.firebase:firebase-iid"

this will solve this problem