【问题标题】:Why I don't receive any report of crashes Firebase?为什么我没有收到任何有关 Firebase 崩溃的报告?
【发布时间】:2019-10-13 10:55:39
【问题描述】:

我正在尝试为我的应用添加 Firebase 支持,但在添加了所有依赖项后,我仍然无法收到任何报告。我也重新安装了我的应用程序,但它对我没有帮助。问题可能出在哪里?我还将添加一些关于我的问题的其他重要信息,但请告诉我我必须添加什么来解决这个问题。

更新

我的 gradle 文件,项目一:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
        maven {
            url 'https://maven.fabric.io/public'
        }
    }


    dependencies {
        classpath 'com.android.tools.build:gradle:3.5.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50"
        classpath 'com.google.gms:google-services:4.3.2'
        classpath 'io.fabric.tools:gradle:1.31.1'  // Crashlytics plugin
    }
}



allprojects {
    repositories {
        google()
        jcenter()
        maven {
            google()
            url 'https://jitpack.io'
        }

        maven { url 'https://maven.google.com' }
    }
}

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

应用级别:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'


android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "..."
        minSdkVersion 21
        targetSdkVersion 28
        versionCode 1
        versionName "..."
        testInstrumentationRunner "android.support.Singleton.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility = '1.8'
        targetCompatibility = '1.8'
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.google.firebase:firebase-core:17.2.0'
    testImplementation 'junit:junit:4.12'
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.50"

    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    // Retrofit
    implementation 'com.squareup.retrofit2:retrofit:2.5.0'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
    implementation 'com.squareup.retrofit2:converter-scalars:2.3.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
    implementation 'us.belka:androidtoggleswitch:1.2.2'
    implementation 'commons-io:commons-io:2.4'
    implementation files('libs/mail.jar')
    implementation 'com.github.droidbond:LoadingButton:0.1.5'

    implementation 'com.samigehi:loadingview:1.1'

    implementation 'io.github.tonnyl:whatsnew:0.1.1'
    implementation 'com.github.GrenderG:Toasty:1.3.1'
    implementation 'com.lsjwzh:materialloadingprogressbar:0.5.8-RELEASE'
    implementation 'com.daimajia.swipelayout:library:1.2.0@aar'

    implementation 'com.google.firebase:firebase-analytics:17.2.0'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'

    
    testImplementation 'junit:junit:4.12'
}

因此,在将所有重要范围添加到我的代码后,我完全重新安装了我的应用程序。这意味着我首先将其从设备中删除,然后再次安装。也许问题是因为我在模拟器上重新安装了这个应用程序????现在我有这张照片:

我无法完成编号为 3 的勾选步骤。也许有人知道我在哪里做错了?

【问题讨论】:

  • 我们无法帮助您,如果您没有看到您所做的事情,请将您的 build.gradle 文件同时发布到应用级别和项目中。
  • @jake,我已经更新了我的问题,请检查一下 :)
  • 您是否尝试过启动碰撞测试?
  • 是的,当然))这是我做的第一件事 :) 它没有帮助我

标签: android firebase crashlytics


【解决方案1】:

也许这些信息会帮助除我之外的其他人))我已经解决了这个问题,将一些行添加到我的 AndroidManifest 到 application 范围:

 <meta-data
            android:name="firebase_crashlytics_collection_enabled"
            android:value="true" />

这也将在您的项目中启用 crashlytics,而不会造成崩溃。祝你好运:D

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2016-09-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多