Failed to resolve: com.crashlytics.sdk.android:crashlytics:2.6.7

Juhi Matta picture Juhi Matta · Mar 19, 2017 · Viewed 12.6k times · Source

I added the following the in my project's build.gradle file:

Buildscript {
   repositories {
       jcenter()
   maven { url 'https://maven.fabric.io/public' }
}
dependencies {
   classpath 'io.fabric.tools:gradle:1.14.3'
}

I addded this in the AndroidManifest.xml file:

<meta-data
   android:name="io.fabric.ApiKey"
   android:value="apiKeyValue"/>

I added this in the build.gradle(app) file:

apply plugin: 'io.fabric'

And the following dependency:

compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
    transitive = true;
}

After all this, why does not resolve the Crashlytics dependency?

Answer

Cochi picture Cochi · Mar 19, 2017

Upgrade your dependencies like so:

Buildscript {
   repositories {
       jcenter()
   maven { url 'https://maven.fabric.io/public' }
}
dependencies {
    //classpath 'io.fabric.tools:gradle:1.14.3' upgrade to the lastest version for compatibility
    classpath 'io.fabric.tools:gradle:1.22.1'
}

And add the following in the build.gradle (app) file:

repositories { 
    maven { url 'https://maven.fabric.io/public' } 
}