首页 > 解决方案 > I cannot view crash detail of Firebase Crashlytics for android and got stuck on "Build and run your app"

问题描述

I try to setup Firebase Crashlytics after done setup Firebase.

The crashes was sent successfully.

log from Logcat

Which I can see them in firebase dashboard.

Firebase Dashboard crashes

But When I enter crashlytics to see crash detail.

I got stuck on step 3 (Build and run your app , We'll be listening for your app to communicate with our servers.).

I already try uninstall-reinstall , remove fabric or firebase crash report part but not working at all.

enter image description here

Here is firebase,fabric,crashlytics version I use.

classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.google.gms:google-services:4.0.2'
classpath 'io.fabric.tools:gradle:1.26.1'

implementation 'com.google.firebase:firebase-core:16.0.7'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.9@aar') 
{
    transitive = true;
}

Any solution?

标签: androidfirebasecrashlytics

解决方案


我之前在这里评论过解决方案的人,但幸运的是我自己得到了解决方案。

任何地方都没有提到应用程序的初始化以在我们的控制台上获取崩溃分析报告!

第 1 步。首先按照官方文档的链接包含所有依赖项,因为它在那里给出,并通过 firebase 控制台设置您的 firebase 应用程序。

步骤 2.现在在您的基础应用程序类或基础活动类中进行以下初始化。

FirebaseApp.initializeApp(getApplicationContext());
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true);

现在清理你的项目并进行几次强制崩溃,你应该能够在你的 firebase 控制台上看到你的 crashlytics 报告

另请参阅此答案OkHttp 超时问题


推荐阅读