I’ve added Firebase Crashlytics dependencies to my Android application, and while the Firebase initialization seems to be working fine (e.g., FirebaseApp.initializeApp(this) is called in onCreate()), I am not seeing any crash reports on the Firebase Crashlytics dashboard, even after intentionally throwing a runtime error.
I have added the required dependencies and applied the Crashlytics plugin in the build.gradle file. The ProGuard rules for Crashlytics have also been configured. I tried force-sending logs using FirebaseCrashlytics.getInstance().sendUnsentReports(), but the dashboard remains inactive.
What could be the possible reasons for this, and how can I resolve the issue to ensure crash reports are sent and displayed properly in the Crashlytics dashboard?
build.gralde(:app)
plugins{
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
alias(libs.plugins.hilt)
alias(libs.plugins.compose.compiler)
alias(libs.plugins.firebase.crashlytics)
}
dependencies {
implementation(libs.firebase.crashlytics)
}
build.gralde(:project)
plugins{
alias(libs.plugins.android.application) apply false
alias(libs.plugins.jetbrains.kotlin.android) apply false
alias(libs.plugins.hilt) apply false
alias(libs.plugins.compose.compiler) apply false
alias(libs.plugins.firebase.crashlytics) apply false
}
libs.version.toml
[versions]
firebase-bom = "33.2.0"
firebase-crashlytics = "3.0.2"
[libraries]
firebase-bom = { group = "com.google.firebase", name = "firebase-bom", version.ref = "firebase-bom" }
firebase-analytics = { group = "com.google.firebase", name = "firebase-analytics" }
firebase-messaging-ktx = { group = "com.google.firebase", name = "firebase-messaging" }
firebase-crashlytics = {group = "com.google.firebase" , name="firebase-crashlytics"}
[plugins]
android-application = { id = "com.android.application", version.ref = "android-gradle-plugin" }
jetbrains-kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt-android" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
firebase-crashlytics = {id = "com.google.firebase.crashlytics" , version.ref = "firebase-crashlytics"}
@HiltAndroidApp
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
Timber.plant(Timber.DebugTree())
KakaoSdk.init(this, getString(R.string.kakao_share_app_key))
FirebaseApp.initializeApp(this)
Thread.setDefaultUncaughtExceptionHandler { _, throwable ->
Toast.makeText(this,"Error", Toast.LENGTH_SHORT).show()
// dashboard is not showing !
Firebase.crashlytics.recordException(throwable)
FirebaseCrashlytics.getInstance().log("APP CRASHED MANUALLY")
FirebaseCrashlytics.getInstance().sendUnsentReports()
}
}
}
I expected the Firebase Crashlytics dashboard to be displayed.
2
Answers
Thank you for your response, Nguyễn Mạnh Cường.
Even after trying the suggestions mentioned, the issue wasn’t resolved, but I found the cause while making other attempts.
I initially thought that adding only the Firebase Crashlytics dependency would suffice, but the com.google.gms.google-services plugin was essential.
After adding that plugin, the problem was resolved.
Add to My Application
I found it here
link