androidfirebasecrashlyticsandroid-app-indexing

issues in implementing firebase crash analytics


I am trying to implement firebase crash analytics for my android app I added the dependencies as as shown in firebase site,I also added the googleservices.json. Now after making changes I installed my map and it crashes.

I have attached screenshotlogcat image of logcat. Please help me.

build.gradle of app

    apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'com.google.gms.google-services'

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.1"

    defaultConfig {
        applicationId "com.android.quotesapp"
        minSdkVersion 21
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    buildFeatures {
        viewBinding true
    }
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.6.0'
    implementation 'androidx.appcompat:appcompat:1.3.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
    implementation 'com.android.support:design:28.0.0'
    implementation("androidx.recyclerview:recyclerview:1.2.1")
    // For control over item selection of both touch and mouse driven selection
    implementation("androidx.recyclerview:recyclerview-selection:1.1.0")
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation("com.android.volley:volley:1.2.0")
    implementation "androidx.cardview:cardview:1.0.0"
    implementation platform('com.google.firebase:firebase-bom:28.3.1')
    implementation 'com.google.firebase:firebase-analytics-ktx'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.google.firebase:firebase-core:19.0.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'


}

Solution

  • Add the following in your gradle file:

    apply plugin: 'com.google.firebase.crashlytics'
    

    After

    buildFeatures {
    
    } 
    

    add

    compileOptions {
         sourceCompatibility JavaVersion.VERSION_1_8
         targetCompatibility JavaVersion.VERSION_1_8
    }
    

    Also add

    implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
    

    Also in your project build.gradle if you have not added

    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0'
    

    in dependencies then do so