Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase crashlytics error: Unable to load class 'org.gradle.api.tasks.TaskProvider'

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.

like image 202
asadinside Avatar asked Oct 26 '25 17:10

asadinside


1 Answers

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.

like image 134
Itai Spector Avatar answered Oct 28 '25 07:10

Itai Spector



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!