我按照https://firebase.google.com/docs/crash/android的所有步骤来实施Firebase崩溃报告。但是我无法在Firebase控制台上看到我的崩溃报告。
在Android studio的logcat中,它显示了我:
V / FirebaseCrash:已禁用Firebase崩溃报告。
我不了解如何启用崩溃报告。我还提到How to enable Firebase Crash Reporting - Android 但没有什么能帮助我。
我使用自己的代码抛出异常以查看它是否有效:
try {
throw new NullPointerException();
} catch (NullPointerException ex) {
FirebaseCrash.logcat(Log.ERROR, TAG, "NPE caught");
FirebaseCrash.report(ex);
}
Project Gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.1.3' classpath 'com.google.gms:google-services:3.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } }
App Gradle:
apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion '21.1.2' defaultConfig { applicationId "medimanage.corporate.mobile" minSdkVersion 19 targetSdkVersion 22 versionCode 3 versionName "2.2" } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:22.2.1' compile 'com.android.support:design:22.2.1' compile 'com.android.support:support-v4:+' compile 'com.daimajia.slider:library:1.1.5@aar' compile 'uk.co.chrisjenx:calligraphy:2.1.0' compile 'com.google.code.gson:gson:2.4' compile 'de.keyboardsurfer.android.widget:crouton:1.8.5@aar' compile 'com.astuetz:pagerslidingtabstrip:1.0.1' compile 'com.github.clans:fab:1.4.0' compile 'com.android.support:cardview-v7:22.2.1' compile files('libs/android-error-reporter.jar') compile 'com.google.firebase:firebase-core:9.6.0' compile 'com.google.firebase:firebase-crash:9.6.0' } apply plugin: 'com.google.gms.google-services'
请帮我解决这个问题。
答案 0 :(得分:9)
此错误
V / FirebaseCrash:已禁用Firebase崩溃报告。
在设备或模拟器未安装 9.6.x 的情况下发生。