我没有在仪表板中收到firebase crashlytics消息

时间:2018-04-19 09:21:36

标签: android firebase crashlytics

我正在尝试使用。 firebase crashlytics知道我在android中遇到的崩溃。我。工作室版本是3.0.1。任何人都可以告诉我到底哪里出错了。我也在firebase中启用了crashlytics 我附上了我的应用级别和项目级别文件

app级别档案

apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-perf'
apply plugin: 'io.fabric'

android {
    compileSdkVersion 26
    defaultConfig {
        applicationId "com.bodaty.samyata.samyata"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.google.firebase:firebase-core:11.8.0'
    implementation 'com.google.firebase:firebase-firestore:11.8.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.google.firebase:firebase-auth:11.8.0'
    implementation 'de.hdodenhof:circleimageview:2.2.0'
    implementation 'com.google.firebase:firebase-database:11.8.0'
    implementation 'com.google.firebase:firebase-storage:11.8.0'
    implementation 'com.github.bumptech.glide:glide:4.1.1'
    implementation 'com.facebook.android:facebook-android-sdk:4.25.0'
    implementation 'com.google.android.gms:play-services-auth:11.8.0'
    implementation 'me.dm7.barcodescanner:zxing:1.9'
    implementation 'com.google.android.gms:play-services-maps:11.8.0'
    implementation 'com.google.android.gms:play-services-location:11.8.0'
    implementation 'com.google.firebase:firebase-messaging:11.8.0'
    implementation 'com.android.support:support-v4:26.1.0'
    implementation 'com.android.support:cardview-v7:26.1.0'
    implementation 'com.google.maps.android:android-maps-utils:0.4'
    compile 'com.google.firebase:firebase-perf:11.8.0'
    compile 'com.crashlytics.sdk.android:crashlytics:2.9.1'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
apply plugin: 'com.google.gms.google-services'

项目级别档案``

  buildscript {

        repositories {
            google()
            jcenter()
            maven {
                url 'https://maven.fabric.io/public'
            }
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.0.1'
            classpath 'com.google.gms:google-services:3.2.0'
            classpath 'com.google.firebase:firebase-plugins:1.1.5'
            classpath 'io.fabric.tools:gradle:1.25.1'

        }
    }

    allprojects {
        repositories {
            google()
            jcenter()
            maven {
                url "https://maven.google.com" // Google's Maven repository

            }
            maven {
                url 'https://maven.fabric.io/public'
            }
        }
    }

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

非常感谢

1 个答案:

答案 0 :(得分:0)

通过扩展应用程序来创建您的Application类,因为您必须初始化Firebase Crashlyitics

public class MyApplication extends Application {


    @Override
    public void onCreate() {
        super.onCreate();
        Fabric.with(this, new Crashlytics());
    }
}

在AndroidManifest文件中

<application
        android:name=".MyApplication"
        android:allowBackup="false"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
.....

</application>