25

it worked before I don't change anything but today I got this error, here my gradle

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

}

dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
}}
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
hugerde
  • 919
  • 1
  • 12
  • 27

6 Answers6

17

Looks like jcenter is reporting that it has fabric and crashlytics but they don't.

What fixed it for me is to move the fabric maven up before jcenter like this:

repositories {
    mavenLocal()
    maven { url "https://maven.fabric.io/public" }
    jcenter()
    google()
}
MobileSam
  • 818
  • 8
  • 14
13

There is some change in fabric please check this:- https://docs.fabric.io/android/changelog.html#fabric-dependency-to-1-4-3

Add this to your gradle:-

compile group: 'io.fabric.sdk.android', name: 'fabric', version: '1.4.3'
Aris_choice
  • 392
  • 2
  • 18
8

I also faced the same issue today. I am using crashlytics as well. I have just changed the version of crashlytics to "2.9.3" from "2.6.5" and gradle build successfully.

implementation('com.crashlytics.sdk.android:crashlytics:2.9.3@aar') {
    transitive = true;
}
Chirag Chavda
  • 556
  • 4
  • 12
2

I had the same problem after reinstalling windows and android studio. I had

dependencies {
        classpath 'io.fabric.tools:gradle:1.25.1'

    }
with

    implementation('com.crashlytics.sdk.android:crashlytics:2.8.0@aar')

The only solution for me was to upgrade to

dependencies {
        classpath 'io.fabric.tools:gradle:1.25.4'

    }

with

implementation('com.crashlytics.sdk.android:crashlytics:2.9.3@aar') 

Hope it helps!

1

1,clean project 2,changed the version of compile('com.crashlytics.sdk.android:answers:1.4.2@aar')

walter
  • 21
  • 1
1

In build.gradle(Module app): Modify like below

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        // These docs use an open ended version so that our plugin
        // can be updated quickly in response to Android tooling updates

        // We recommend changing it to the latest version from our changelog:
        // https://docs.fabric.io/android/changelog.html#fabric-gradle-plugin
        classpath 'io.fabric.tools:gradle:1.27.0'
    }
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven { url 'https://maven.fabric.io/public' }
}
android {
    compileSdkVersion 28
    buildToolsVersion '28.0.3'
    defaultConfig {
        applicationId "com.rameshr.project"
        minSdkVersion 16
        targetSdkVersion 28
        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(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'com.android.support:appcompat-v7:28.0.0' 
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12' 
    implementation('com.crashlytics.sdk.android:crashlytics:2.8.0@aar') {
        transitive = true;
    } 

}
Ramesh R
  • 7,009
  • 4
  • 25
  • 38