Firebase控制台仍显示Crashlytics实施对话框

时间:2018-09-26 07:13:14

标签: android firebase crashlytics crash-reports

按照文档中的说明实施 https://firebase.google.com/docs/crashlytics/get-started?authuser=0

buildscript {

repositories {
    google()
    jcenter()
    maven { url 'https://maven.fabric.io/public' }
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.1.4'
    classpath 'com.google.gms:google-services:4.0.1'
    classpath 'io.fabric.tools:gradle:1.25.4'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}
allprojects {
    repositories {
        google()
        jcenter()
        maven {
            url 'https://maven.google.com/'
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

模块:应用

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

......
......
dependencies {
    ........
    ........

    implementation 'com.google.firebase:firebase-core:16.0.3'
    implementation 'com.google.firebase:firebase-messaging:17.3.2'
    implementation 'com.startapp:inapp-sdk:3.10.1'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.5'
    implementation 'com.google.firebase:firebase-crash:11.8.0'
}
apply plugin: 'com.google.gms.google-services'

在主要Laucher活动中

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    /*StartAppSDK.init(this, getResources().getString(R.string.startApp_sdk), false);
    StartAppAd.disableSplash();*/

    setContentView(R.layout.activity_permission);

//Both Tried But Not get Any result

    Fabric.with(this, new Crashlytics());
   /*final Fabric fabric = new Fabric.Builder(this)
            .kits(new Crashlytics())
            .debuggable(true)  // Enables Crashlytics debugger
            .build();
    Fabric.with(fabric);*/
    FirebaseCrash.log("Activity created");
  }
}

我尝试了手动崩溃

Crashlytics.getInstance().crash(); // Force a crash

我的问题是Firebase控制台仍显示实现对话框

enter image description here

为什么自2个小时前开始实施?

崩溃应用程序日志后,看起来...为了仅测试Basb,我从清单文件中删除了MainActivity。错误如期出现,但Firebase控制台仍显示实现对话框。为什么?

D/CrashlyticsCore: Crashlytics is handling uncaught exception "android.content.ActivityNotFoundException: Unable to find explicit activity class {com.gauravkhannamarketeer.navratriwallpaperapp/com.gauravkhannamarketeer.navratriwallpaperapp.activity.MainActivity}; have you declared this activity in your AndroidManifest.xml?" from thread main
D/Answers: Logged crash
D/SensorManager: sensorCTSV isCtsVerifier false
                 sensorCTSV isCtsVerifier false
                 sensorCTSV isCtsVerifier false
D/CrashlyticsCore: No log data to include with this event.
D/CrashlyticsCore: Closing open sessions.
                   Closing session: 5BAB3C570014-0001-7C73-036ED06B5023
                   Collecting session parts for ID 5BAB3C570014-0001-7C73-036ED06B5023
D/CrashlyticsCore: Session 5BAB3C570014-0001-7C73-036ED06B5023 has fatal exception: true
                   Session 5BAB3C570014-0001-7C73-036ED06B5023 has non-fatal exceptions: false
D/CrashlyticsCore: Collecting SessionStart data for session ID 5BAB3C570014-0001-7C73-036ED06B5023
D/CrashlyticsCore: Collecting SessionUser data for session ID 5BAB3C570014-0001-7C73-036ED06B5023
D/CrashlyticsCore: Collecting SessionApp data for session ID 5BAB3C570014-0001-7C73-036ED06B5023
D/CrashlyticsCore: Collecting SessionOS data for session ID 5BAB3C570014-0001-7C73-036ED06B5023
D/CrashlyticsCore: Collecting SessionDevice data for session ID 5BAB3C570014-0001-7C73-036ED06B5023
D/CrashlyticsCore: Removing session part files for ID 5BAB3C570014-0001-7C73-036ED06B5023
D/CrashlyticsCore: Opening a new session with ID 5BAB3C9403A8-0002-7C73-036ED06B5023
D/CrashlyticsCore: Crashlytics completed exception processing. Invoking default exception handler.

1 个答案:

答案 0 :(得分:0)

顺便说一句,主要问题仍然存在,但我通过使用android studio织物插件实现织物实现来解决它

织物

通过您的IDE存储库下载“ Fabric for Android”。 Mac用户:从Android Studio / IntelliJ菜单中选择“首选项...”。 Windows和Linux用户:从“文件”菜单中选择“设置”。

在“设置”对话框的左侧选择“插件”。选择“浏览存储库...”

搜索“ Fabric for Android”并安装插件。

IDE重新启动后,单击“结构”工具栏按钮以开始使用结构!