← ClaudeAtlas

android-crash-reportinglisted

Crash reporting and ANR detection for Android - Firebase Crashlytics setup, non-fatal exception boundaries, custom keys and log lines, user identity rules, ANR detection, ViewModel crash boundaries, and debug vs release configuration. Use this skill whenever adding crash reporting, recording non-fatal errors, adding diagnostic context to crashes, setting up Crashlytics, or tuning crash triage workflows. Trigger on phrases like "crash reporting", "Crashlytics", "Firebase Crashlytics", "non-fatal", "ANR", "crash boundary", "recordException", "crash log", "custom key", "crash triage".
lenorebreakneck630/claude-zero-to-hero-android-KMP · ★ 1 · AI & Automation · score 64
Install: claude install-skill lenorebreakneck630/claude-zero-to-hero-android-KMP
# Android Crash Reporting ## Overview Crash reporting surfaces real-world failures that never appear in tests. This skill covers the full setup from Gradle to triage, with strict rules on what context to attach and how to keep PII out of crash reports. Stack: **Firebase Crashlytics** (primary), Strict Mode for ANR/violation detection. Related skills: `android-analytics-logging`, `android-error-handling`. --- ## Gradle Setup ```kotlin // build.gradle.kts (:app) plugins { id("com.google.gms.google-services") id("com.google.firebase.crashlytics") } dependencies { implementation(platform(libs.firebase.bom)) implementation(libs.firebase.crashlytics) } ``` --- ## Enable / Disable by Build Type Never send debug crashes to Crashlytics — it pollutes production data. ```kotlin // build.gradle.kts (:app) buildTypes { debug { manifestPlaceholders["crashlyticsEnabled"] = false } release { manifestPlaceholders["crashlyticsEnabled"] = true } } ``` ```xml <!-- AndroidManifest.xml --> <meta-data android:name="firebase_crashlytics_collection_enabled" android:value="${crashlyticsEnabled}" /> ``` Or programmatically in `Application.onCreate()`: ```kotlin FirebaseCrashlytics.getInstance() .setCrashlyticsCollectionEnabled(!BuildConfig.DEBUG) ``` --- ## CrashReporter Interface (Domain Layer) Wrap Crashlytics behind an interface so presentation/domain never import Firebase directly. ```kotlin // domain layer interface Cra