3

I am trying to update fabric to Firebase crashlytics .

I followed their starting guide given here

The error I am getting are below:

enter image description here (build.gradle) module-level:

enter image description here

I am using Gradle version: 4.6 distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip

Let me know if needed more info.

0

1 Answer 1

2

OK, Updated Android studio to the latest stable - 4.1

Updated Kotlin to the latest version - 1.14.10

Here's my build gradle file:

buildscript {
    ext.kotlin_version = '1.4.10'
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath "com.android.tools.build:gradle:4.1.0"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.4'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
    }
}

Also, gradle version should be 6.5 in gradle-wrapper.proporties file

distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip

It's all working now.

5
  • Thanks for your answer, my project is still in java, should I still add kotlin dependency ?
    – asadinside
    Nov 9, 2020 at 9:51
  • Updated android studio to version 4.1: Added above dependencies which you mentioned, I have tried to delete all the gradle files then download gradle from scratch, tried Invalidate Catch / Restart functionality, doesn't work. I am getting these errors: Unable to find method 'org.gradle.api.reporting.internal.TaskReportContainer.<init>(Ljava/lang/Class;Lorg/gradle/api/Task;)V' org.gradle.api.reporting.internal.TaskReportContainer.<init>(Ljava/lang/Class;Lorg/gradle/api/Task;)V In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
    – asadinside
    Nov 9, 2020 at 9:57
  • @asadinside kotlin dependency is relevant if you use it, otherwise i guess not. Nov 9, 2020 at 21:14
  • @asadinside another thing, use this guide for installing firebase crashlytics, it seems like the upgrade guide has a few missing points firebase.google.com/docs/crashlytics/… Nov 9, 2020 at 21:15
  • 1
    I fixed the issue, actually problem was using correct versions (plugins, gradle). Configs I used: - gradle:3.4.3 - google-services:4.3.3' - firebase-crashlytics-gradle:2.2.0' - distributionUrl=gradle-5.1.1-all.zip - firebase-analytics:18.0.0' - firebase-crashlytics:17.2.2'.
    – asadinside
    Nov 10, 2020 at 15:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.