Skip to content

Comments

Fix Crashlytics not initializing due to R8 stripping constructors#1030

Merged
gregmarra merged 1 commit intomainfrom
fix-crashlytics-r8
Feb 13, 2026
Merged

Fix Crashlytics not initializing due to R8 stripping constructors#1030
gregmarra merged 1 commit intomainfrom
fix-crashlytics-r8

Conversation

@gregmarra
Copy link
Contributor

Summary

  • R8 (AGP 9) aggressively removes no-arg constructors that aren't directly referenced in code
  • Firebase discovers CrashlyticsRegistrar via reflection, so the constructor gets stripped and Crashlytics silently fails to initialize
  • This explains why the 10.9.0 alpha has zero Crashlytics telemetry despite users actively running it
  • Fix: ProGuard keep rule for all Firebase ComponentRegistrar constructors

Evidence

Logcat from the release build before fix:

W ComponentDiscovery: Could not instantiate com.google.firebase.crashlytics.CrashlyticsRegistrar
W ComponentDiscovery: Caused by: java.lang.NoSuchMethodException: CrashlyticsRegistrar.<init> []

After fix:

I FirebaseCrashlytics: Initializing Firebase Crashlytics 19.3.0 for com.thebluealliance.androidclient

Test plan

  • Verified Crashlytics init failure in logcat before fix
  • Verified Crashlytics initializes successfully after fix
  • Publish new alpha and confirm crash data appears in Firebase Console

🤖 Generated with Claude Code

…ar constructors

R8 (AGP 9) aggressively removes no-arg constructors that aren't directly
referenced in code. Firebase discovers CrashlyticsRegistrar via reflection,
so the constructor gets stripped and Crashlytics silently fails to
initialize. This explains zero Crashlytics telemetry from the 10.9.0 alpha.

Keep all Firebase ComponentRegistrar constructors to fix Crashlytics and
protect other Firebase components from the same issue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gregmarra gregmarra merged commit e027353 into main Feb 13, 2026
5 checks passed
@gregmarra gregmarra deleted the fix-crashlytics-r8 branch February 13, 2026 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant