使用
com.google.firebase:firebase-perf:16.2.3
com.google.firebase:firebase-core:16.0.6
并使用 AndroidX
android.useAndroidX=true
android.enableJetifier=true
应用程序启动时出现异常崩溃。
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)
如果我用 - 禁用 proguard,minifyEnabled false
它可以工作,但这不是一个选项。