使用FirebaseRemoteConfigManager启动时,Android应用程序崩溃

时间:2019-01-04 13:01:39

标签: android firebase firebase-performance

我的应用似乎无法在某些设备上启动。但这并没有使我通过Firebase崩溃。

这是我收到的错误报告:

2019-01-04 12:48:18.443 32369-32438/uk.co.hiyacar I/uk.co.hiyacar: Rejecting re-init on previously-failed class java.lang.Class<com.google.firebase.perf.internal.RemoteConfigManager>: java.lang.ExceptionInInitializerError: 
2019-01-04 12:48:18.443 32369-32438/uk.co.hiyacar I/uk.co.hiyacar: (Throwable with no stack trace)
2019-01-04 12:48:18.460 32369-32438/uk.co.hiyacar E/AndroidRuntime: FATAL EXCEPTION: pool-12-thread-1
    Process: uk.co.hiyacar, PID: 32369
    java.lang.NoClassDefFoundError: com.google.firebase.perf.internal.RemoteConfigManager
        at com.google.firebase.perf.internal.RemoteConfigManager.zzcb(Unknown Source:17)
        at com.google.firebase.perf.internal.zzd.zzbd(Unknown Source:51)
        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:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:764)
     Caused by: java.lang.ExceptionInInitializerError
        at com.google.firebase.perf.internal.RemoteConfigManager.zzcb(Unknown Source:17)
        at com.google.firebase.perf.internal.FeatureControl.<init>(Unknown Source:2)
        at com.google.firebase.perf.internal.FeatureControl.zzar(Unknown Source:10)
        at com.google.firebase.perf.internal.GaugeManager.<init>(Unknown Source:4)
        at com.google.firebase.perf.internal.GaugeManager.zzbf(Unknown Source:22)
        at com.google.android.gms.internal.firebase-perf.zzat.<init>(Unknown Source:2)
        at com.google.android.gms.internal.firebase-perf.zzat.zza(Unknown Source:1)
        at com.google.firebase.perf.network.FirebasePerfUrlConnection.instrument(Unknown Source:9)
        at io.fabric.sdk.android.services.network.HttpRequest$ConnectionFactory$1.create(HttpRequest.java:315)
        at io.fabric.sdk.android.services.network.HttpRequest.createConnection(HttpRequest.java:1298)
        at io.fabric.sdk.android.services.network.HttpRequest.getConnection(HttpRequest.java:1318)
        at io.fabric.sdk.android.services.network.HttpRequest.useCaches(HttpRequest.java:2104)
        at io.fabric.sdk.android.services.common.AbstractSpiCall.getHttpRequest(AbstractSpiCall.java:139)
        at io.fabric.sdk.android.services.settings.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:86)
        at io.fabric.sdk.android.services.settings.DefaultSettingsController.loadSettingsData(DefaultSettingsController.java:80)
        at io.fabric.sdk.android.services.settings.DefaultSettingsController.loadSettingsData(DefaultSettingsController.java:64)
        at io.fabric.sdk.android.services.settings.Settings.loadSettingsData(Settings.java:155)
        at io.fabric.sdk.android.Onboarding.retrieveSettingsData(Onboarding.java:126)
        at io.fabric.sdk.android.Onboarding.doInBackground(Onboarding.java:99)
        at io.fabric.sdk.android.Onboarding.doInBackground(Onboarding.java:45)
        at io.fabric.sdk.android.InitializationTask.doInBackground(InitializationTask.java:63)
        at io.fabric.sdk.android.InitializationTask.doInBackground(InitializationTask.java:28)
        at io.fabric.sdk.android.services.concurrency.AsyncTask$2.call(AsyncTask.java:311)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:764) 
     Caused by: java.lang.IllegalStateException: Default FirebaseApp is not initialized in this process uk.co.hiyacar. Make sure to call FirebaseApp.initializeApp(Context) first.
        at com.google.firebase.FirebaseApp.getInstance(com.google.firebase:firebase-common@@16.0.2:240)
        at com.google.firebase.remoteconfig.FirebaseRemoteConfig.getInstance(Unknown Source:11)
        at com.google.firebase.perf.internal.RemoteConfigManager.<init>(Unknown Source:2)
        at com.google.firebase.perf.internal.RemoteConfigManager.<clinit>(Unknown Source:160)
        at com.google.firebase.perf.internal.RemoteConfigManager.zzcb(Unknown Source:17) 
        at com.google.firebase.perf.internal.FeatureControl.<init>(Unknown Source:2) 
        at com.google.firebase.perf.internal.FeatureControl.zzar(Unknown Source:10) 
        at com.google.firebase.perf.internal.GaugeManager.<init>(Unknown Source:4) 
        at com.google.firebase.perf.internal.GaugeManager.zzbf(Unknown Source:22) 
        at com.google.android.gms.internal.firebase-perf.zzat.<init>(Unknown Source:2) 
        at com.google.android.gms.internal.firebase-perf.zzat.zza(Unknown Source:1) 
        at com.google.firebase.perf.network.FirebasePerfUrlConnection.instrument(Unknown Source:9) 
        at io.fabric.sdk.android.services.network.HttpRequest$ConnectionFactory$1.create(HttpRequest.java:315) 
        at io.fabric.sdk.android.services.network.HttpRequest.createConnection(HttpRequest.java:1298) 
        at io.fabric.sdk.android.services.network.HttpRequest.getConnection(HttpRequest.java:1318) 
        at io.fabric.sdk.android.services.network.HttpRequest.useCaches(HttpRequest.java:2104) 
        at io.fabric.sdk.android.services.common.AbstractSpiCall.getHttpRequest(AbstractSpiCall.java:139) 
        at io.fabric.sdk.android.services.settings.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:86) 
        at io.fabric.sdk.android.services.settings.DefaultSettingsController.loadSettingsData(DefaultSettingsController.java:80) 
        at io.fabric.sdk.android.services.settings.DefaultSettingsController.loadSettingsData(DefaultSettingsController.java:64) 
        at io.fabric.sdk.android.services.settings.Settings.loadSettingsData(Settings.java:155) 
        at io.fabric.sdk.android.Onboarding.retrieveSettingsData(Onboarding.java:126) 
        at io.fabric.sdk.android.Onboarding.doInBackground(Onboarding.java:99) 
        at io.fabric.sdk.android.Onboarding.doInBackground(Onboarding.java:45) 
        at io.fabric.sdk.android.InitializationTask.doInBackground(InitializationTask.java:63) 
        at io.fabric.sdk.android.InitializationTask.doInBackground(InitializationTask.java:28) 
        at io.fabric.sdk.android.services.concurrency.AsyncTask$2.call(AsyncTask.java:311) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458) 
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 
        at java.lang.Thread.run(Thread.java:764) 

我已经在我的Application类中添加了FirebaseApp.initializeApp(this);,并根据之前的答案和Google论坛进行了一些变通,但是在少数设备上仍然无法使用。我正在使用所有最新的构建工具和firebase库,甚至在我的应用程序中添加了一个multidex-config.txt类来尝试阻止它,但仍然没有。

有人也有这个问题吗?特别是这样,还是奇怪的情况?如果需要,我可以提供更多详细信息

0 个答案:

没有答案