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.
-
1Having the same issue. Will post solution here once I figure it outPeter– Peter2020年08月18日 11:02:08 +00:00Commented Aug 18, 2020 at 11:02
-
This bug is annoying. We have it and I have done everything to help fixing it but no luckseyed Jafari– seyed Jafari2020年08月30日 14:52:39 +00:00Commented Aug 30, 2020 at 14:52
15 Answers 15
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 !
4 Comments
E/FirebaseCrashlytics: 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. how do i resolve this?That normally happens when the plugin apply plugin: 'com.google.firebase.crashlytics' is missing in build.gradle app level.
2 Comments
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'
}
}
1 Comment
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'
}
Comments
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()
}
}
Comments
Solution for Xamarin Forms in the strings.xml or styles.xaml: Add the following line
<string name="com.crashlytics.android.build_id">1</string>
You can get more information here https://github.com/xamarin/GooglePlayServicesComponents/issues/642
Comments
Add the code below to project/android/app/build.gradle
apply plugin: 'com.google.firebase.crashlytics'
1 Comment
In my case this error is caused by shrinkResources = true (in app/build.gradle) in combination with android-gradle-plugin version 8.3.0-alphaXX.
In order to fix this I had to add a keep.xml file under res/raw/keep.xml with the following input:
<resources xmlns:tools="http://schemas.android.com/tools"
tools:keep="@string/com.google.firebase.crashlytics.*" />
The actual reason why this bug was introduced by R8 and firebase can be found here: https://github.com/firebase/firebase-android-sdk/issues/5562#issuecomment-1825591774
Comments
add this line
implementation "com.google.firebase:firebase-iid"
this will solve this problem
1 Comment
In my case, the problem was present only on release builds due to R8 being set to "strict". If you're having similar issues with release builds and have R8 enabled, I suggest you add the following entry to your keep.xml file
@string/com_google_firebase_crashlytics_*
In the end should look something like this:
<resources
xmlns:tools="http://schemas.android.com/tools"
tools:shrinkMode="strict"
tools:keep="@string/com_google_firebase_crashlytics_*"/>
Comments
After several hours i finally figured it out. I used ./gradlew app:dependencies command to list the dependency tree just to notice, that some libraries (that were not up to date) used older version of crashlytics library. I updated them and the issue was finally gone!
Comments
I also struggle with this crash (just in my release builds) and as a temporary fix it helps me to turn off shrinking resources. TBH don't know the reason why it was causing this crash yet 🙃
So you can try to set isShrinkResources = false in your app/build.gradle.kts file if you have it enabled
Comments
This solution from google documentation:
Gradle file (project-level)
buildscript {
repositories {
// Make sure that you have the following two repositories
google() // Google's Maven repository
mavenCentral() // Maven Central repository
}
dependencies {
...
// add this line
classpath ("com.google.firebase:firebase-crashlytics-gradle :2.9.9")
}
}
allprojects {
...
repositories {
// Make sure that you have the following two repositories
google() // Google's Maven repository
mavenCentral() // Maven Central repository
}
}
module (app-level) Gradle file
plugins {
id("com.android.application")
// Add the ID of the plugin
id("com.google.firebase.crashlytics")
...
}
Comments
Step 1) In your build.gradle.kts file (Project) to past this line
plugins {
id ("com.google.gms.google-services") version "4.3.15" apply false
id ("com.google.firebase.crashlytics") version "2.9.1" apply false
}
Step 2) In your build,gradle.kts(App) to past this line
plugins {
id("com.google.gms.google-services")
id("com.google.firebase.crashlytics")
}
dependencies {
implementation("com.google.firebase:firebase-analytics-ktx:21.6.2")
implementation("com.google.firebase:firebase-crashlytics-ktx:18.6.4")
implementation("com.google.firebase:firebase-perf:20.5.2")
}
Comments
For those who added the classpath but still ran into the exception, make sure that there isn't a space between the colon and the version number, oddly it'll still crash.
Crash:
classpath 'com.google.firebase:firebase-crashlytics-gradle: 2.9.9' // look at the space in between the colon and 2.9.9
No Crash:
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.9' // no space in between the colon and 2.9.9
2 Comments
Explore related questions
See similar questions with these tags.