Firebase crashlytics data not showing up in dashbord even after a day crashlytics was integrated to android app

时光总嘲笑我的痴心妄想 提交于 2020-04-18 06:54:31

问题


I added firebase crashlytics to my android app about a day ago. But I still see following getting started guide on the crashlytics page of the firebase console.

Following is my git diff for adding crashlytics.

project level gradle file:

@@ -5,10 +5,12 @@ buildscript {
     repositories {
         jcenter()
         google()
+        maven { url 'https://maven.fabric.io/public' }
     }
     dependencies {
         classpath 'com.android.tools.build:gradle:3.5.1'
-        classpath 'com.google.gms:google-services:4.3.0'
+        classpath 'com.google.gms:google-services:4.3.2'
+        classpath 'io.fabric.tools:gradle:1.31.2'  // Crashlytics plugin
         // NOTE: Do not place your application dependencies here; they belong
         // in the individual module build.gradle files
     }
@@ -18,6 +20,7 @@ allprojects {
     repositories {
         jcenter()
         google()
+        maven { url 'https://maven.fabric.io/public' }
     }
 }

app level gradle file:

@@ -1,4 +1,5 @@
 apply plugin: 'com.android.application'
+apply plugin: 'io.fabric'

 android {
     compileSdkVersion 29
@@ -93,6 +94,8 @@ dependencies {
     implementation 'com.google.firebase:firebase-firestore:21.2.0'
     implementation 'com.google.firebase:firebase-auth:19.1.0'
     implementation 'com.google.firebase:firebase-storage:19.1.0'
+    implementation 'com.google.firebase:firebase-analytics:17.2.0'
+    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
     implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
     implementation 'org.dizitart:nitrite:3.2.0'
     implementation 'com.github.bumptech.glide:glide:4.9.0'

I crashed my app several times using following method.

Crashlytics.getInstance().crash();

My device has an internet connection.

I tested using both a debug build and a release build (signed apk).

What could be the reason the dashboard not showing up any crash statistics yet, even after a day of crashlytis setup in the app?


回答1:


Add this at the bottom of the app level build gradle apply plugin: 'com.google.gms.google-services' and add google json to your app folder




回答2:


  1. Remove the line "Crashlytics.getInstance().crash()",
  2. Run your app on a Real Device,
  3. Unplug device,
  4. Close the app,
  5. Open the app on your device as it's unplugged.

Now Check the FireBase again. You should see some charts in Crashlytics Tab.

For testing crashes you can do the above process, but this time with code "Crashlytics.getInstance().crash()".

Note:  Be sure to place this line outside your App Delegate’s "didFinishLaunching" method



来源:https://stackoverflow.com/questions/58514789/firebase-crashlytics-data-not-showing-up-in-dashbord-even-after-a-day-crashlytic

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