【问题标题】:I am not receiving firebase crashlytics messages in dashboard我没有在仪表板中收到 firebase crashlytics 消息
【发布时间】:2018-04-19 09:21:35
【问题描述】:

我正在尝试使用。 firebase crashlytics 了解我在 android .My 中的崩溃。工作室版本是 3.0.1。谁能告诉我我到底哪里出错了。我也在 firebase 中启用了 crashlytics。
我在下面附上了我的应用级别和项目级别成绩文件

应用级成绩文件

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
    }

谢谢你

【问题讨论】:

  • 在您的 Firebase 控制台中,您是看到带有统计信息的屏幕还是看到“配置 crashlitics”?
  • 不先生......没有关于 crashlytics 的信息显示在我的控制台中
  • 我在控制台 hostname=reports.crashlytics.com 中只能看到这一行;服务名称=(空); app_pid=20022; app_uid=10663; ai_flags=1024; ai_family=0; ai_socktype=1;网络ID=0;标记=0;从 prox 结果 0
  • 能否将 crashlitics 控制台的屏幕截图附加到问题中?
  • 也试试添加这个compile 'com.google.firebase:firebase-crash:11.0.1'

标签: android firebase crashlytics


【解决方案1】:

通过扩展 Application 来创建您的 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>

【讨论】:

猜你喜欢
  • 2019-06-25
  • 2020-03-26
  • 2018-06-04
  • 2018-06-12
  • 2020-12-22
  • 2018-11-29
  • 1970-01-01
  • 2015-07-24
相关资源
最近更新 更多