各位程序员好,
我目前遇到一个问题,想知道是否有人或任何人能够提供帮助。
我们已将 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'
在我包含的应用程序级存储库中:jcenter()
mavenCentral()
应用了应用级插件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
我还尝试将 com.google.gms.google-services 放在 Gradle 文件的底部对于项目级别的 Gradle 文件,我在 allprojects 中添加了存储库:
google()
mavenCentral()
jcenter()
当然,对于构建脚本,我添加了存储库jcenter()
mavenCentral()
google()
和依赖项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'
过滤/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
过滤/fa2020-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
我正在用这段代码强制崩溃 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
请帮助我们,谢谢。
最佳答案
你的项目中有哪个版本的 Android studio、gradle 和 build.gradle?根据我的说法,使用两者的最新版本应该可以工作。如果没有,请告诉我。
关于android - Firebase Crashlytics SDK 更新不起作用。报告未显示在控制台中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64645007/