Firebase Crashlytics SDK 更新不起作用。报告未显示在控制台中

Can*_*ing 6 android firebase crashlytics

各位程序员,大家好

我目前遇到一个问题,想知道是否有人或任何人能够提供帮助。

我们已将 Firebase Crashlytics SDK 升级到最新版本,但现在我们没有收到任何报告。

我可以在日志中看到一切正常,但现在正在显示报告。

我添加了应用程序级别的依赖项:

// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:26.0.0')

// Declare the dependencies for the Crashlytics and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'
Run Code Online (Sandbox Code Playgroud)

在应用程序级别的存储库中,我包含了:

jcenter()
mavenCentral()
Run Code Online (Sandbox Code Playgroud)

应用了应用级插件

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services' // Google Services Gradle plugin
apply plugin: 'com.google.firebase.crashlytics' // Apply the Crashlytics Gradle plugin
Run Code Online (Sandbox Code Playgroud)

我也试过将 com.google.gms.google-services 放在 Gradle 文件的底部

对于项目级别的 Gradle 文件,我在 allprojects 中添加了存储库:

google()
mavenCentral()
jcenter()
Run Code Online (Sandbox Code Playgroud)

当然,对于构建脚本,我添加了存储库

jcenter()
mavenCentral()
google()
    
Run Code Online (Sandbox Code Playgroud)

和依赖

classpath 'com.android.tools.build:gradle:4.1.0'
classpath 'com.google.gms:google-services:4.3.4'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
    
Run Code Online (Sandbox Code Playgroud)

过滤 /firebase 时,日志显示以下内容

2020-11-02 12:29:59.943 523-523/com.angrynerds.superbrains I/FirebaseApp: Device unlocked: initializing all Firebase APIs for app [DEFAULT]
2020-11-02 12:29:59.994 523-523/com.angrynerds.superbrains I/FirebaseCrashlytics: Initializing Crashlytics 17.2.2
2020-11-02 12:30:00.009 523-523/com.angrynerds.superbrains I/FirebaseInitProvider: FirebaseApp initialization successful
Run Code Online (Sandbox Code Playgroud)

过滤/fa

2020-11-02 12:37:08.750 2128-2177/com.angrynerds.superbrains I/FA: App measurement initialized, version: 33025
2020-11-02 12:37:08.750 2128-2177/com.angrynerds.superbrains I/FA: To enable debug logging run: adb shell setprop log.tag.FA VERBOSE
2020-11-02 12:37:08.750 2128-2177/com.angrynerds.superbrains I/FA: To enable faster debug mode event logging run:
  adb shell setprop debug.firebase.analytics.app com.angrynerds.superbrains
2020-11-02 12:37:08.750 2128-2177/com.angrynerds.superbrains D/FA: Debug-level message logging enabled
2020-11-02 12:37:09.178 2128-2177/com.angrynerds.superbrains I/FA: Tag Manager is not found and thus will not be used
2020-11-02 12:37:09.254 2128-2177/com.angrynerds.superbrains D/FA: Connected to remote service
Run Code Online (Sandbox Code Playgroud)

我用这段代码强迫崩溃

    FirebaseCrashlytics.getInstance().log("Testing!!!");

    try {
        throw new IllegalStateException("Testing new crashlytics sdk :)");
    } catch (IllegalStateException e) {
        e.printStackTrace();
        FirebaseCrashlytics.getInstance().recordException(e);
    }

    if (true) throw new RuntimeException("Test Crash"); // Force a crash
Run Code Online (Sandbox Code Playgroud)

请帮助我们,谢谢。

小智 -2

您的项目中有哪个版本的 Android studio、gradle 和 build.gradle?根据我的说法,使用两者的最新版本应该可以工作。如果没有,请告诉我。