Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
407 views
in Technique[技术] by (71.8m points)

Crashlytics console shows loader, Crashlytics enabled & Setup properly but unable to get the crash reports?

Crashlytics Console Screenshot

I have an Android app with two Build Types. One is Debug and the other one is Release the issue I am facing is that my Debug Build is sending crash reports to Crashlytics and my Release Build is not sending any crash reports to the Crashlytics console and shows the loading icon as shown in the Screenshot.

The difference in both the variants is that one has Proguard enabled and other one doesn't.

Build Types in build.gradle(:app) look like this:

buildTypes {
        debug {
            debuggable true
            firebaseCrashlytics {
                mappingFileUploadEnabled false
            }
        }
        release {
            debuggable false
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig getSigningConfig()
            firebaseCrashlytics {
                mappingFileUploadEnabled false
            }
        }

    }

I have followed the complete for setting up the crashlytics mentioned here: Firebase Crashlytics Guide

Here is the checklist

  1. Enabled Crashlytics From Console
  2. Added the Crashlytics Gradle plugin as a buildscript dependency in project level build.gradle with version:2.3.0
  3. Applied gradle plugin in build.gradle(:app)
  4. Initilized Crashlytics
question from:https://stackoverflow.com/questions/65846382/crashlytics-console-shows-loader-crashlytics-enabled-setup-properly-but-unabl

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Well, Found out that the issue is related to this flag here:

firebaseCrashlytics {
  mappingFileUploadEnabled false
}

In the case of Debug build Proguard is not enabled so the mapping file is not created as well so there is no need to upload the mappings file.

But in the case of Release build, I have enabled the proguard So, technically I need to enable the mappings file to be uploaded so that crashlytics reports can be sent to the console and properly reported.

Changing the above code in Release to this fixed the issue.

firebaseCrashlytics {
  mappingFileUploadEnabled true
}

Got clue from the documentation here

After Fixing that issue I came across another issue while creating the signed apk The Host name may not be empty and you can follow this for the fix.

Cheers :)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...