FirebaseCrash: Failed to initialize crash reporting

我的梦境 提交于 2019-12-07 18:04:57

问题


I am getting following error in my logcat while trying to use Firebase Crash Reporting:

FirebaseCrash: Failed to initialize crash reporting

FirebaseCrash: com.google.firebase.crash.internal.zzg$zza: com.google.android.gms.internal.zzsb$zza: No acceptable module found. Local version is 0 and remote version is 0.

I have added the following in module app project and build gradle:

   classpath 'com.google.gms:google-services:3.0.0'
   compile 'com.google.firebase:firebase-core:9.4.0'
   compile 'com.google.firebase:firebase-ads:9.4.0'
   compile 'com.google.firebase:firebase-crash:9.4.0`

   apply plugin: 'com.google.gms.google-services'

and added google-services.json in the app folder.

I got the Firebase Analytics working after the 24 hours, time limit for first updates. For getting the first error I have added in MainCctivity.

FirebaseCrash.report(new Exception("My first Android non-fatal error"));

The Google Play Services I use is version 9.4.52(238-127739847) in my emulator (Nexus Api 23, Android Version 6.0). Still the error is shown in logcat , how can I get the crash report working?


回答1:


The bottom line here is that Firebase Crash Reporting only works on devices with Google Play services, and that its version needs to match or exceed the Firebase client library version.

If you are running in an emulator, you need to use an image with Play services installed.



来源:https://stackoverflow.com/questions/39324712/firebasecrash-failed-to-initialize-crash-reporting

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!