3

Using

com.google.firebase:firebase-perf:16.2.3
com.google.firebase:firebase-core:16.0.6

and using AndroidX

android.useAndroidX=true
android.enableJetifier=true

Crash with exception on application start.

 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.firebase.perf.FirebasePerformance.isPerformanceCollectionEnabled()' on a null object reference
        at com.google.firebase.perf.internal.zzd.zzbe(Unknown Source:195)
        at com.google.firebase.perf.internal.zzd.zzbd(Unknown Source:44)
        at com.google.firebase.perf.internal.zzd.zzb(Unknown Source:202)
        at com.google.firebase.perf.internal.zze.run(Unknown Source:2)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)

If I disable proguard with minifyEnabled false - it works, but that is not an option.

Martynas Jurkus
  • 9,231
  • 13
  • 59
  • 101

1 Answers1

-2

Updating proguard rules to include

-keep class com.google.firebase.**

fixes the issue.
Also filed a bug report.

Martynas Jurkus
  • 9,231
  • 13
  • 59
  • 101