7

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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Juhi Matta
  • 481
  • 1
  • 5
  • 15

3 Answers3

13

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' } 
}
Daniel
  • 2,355
  • 9
  • 23
  • 30
Cochi
  • 2,199
  • 2
  • 12
  • 15
  • Done with dependency upgrade. But still showing same error – Juhi Matta Mar 19 '17 at 07:53
  • 1
    Avoid to share your API key in public :) – Cochi Mar 19 '17 at 08:03
  • I'm glad to help you :). If this answer has solved your question please consider accepting it by clicking the check-mark and doing a up vote. This indicates to the wider community that you've found a solution. There is no obligation to do this – Cochi Mar 20 '17 at 05:39
3

It is recommended to use 1.+ for the Fabric plugin dependency to use the latest version rather than specifying a specific version:

classpath 'io.fabric.tools:gradle:1.+'

There are detailed instructions on how to integrate Crashlytics into Android studio here.

mbonness
  • 1,612
  • 1
  • 18
  • 20
0

Crashlytics Fabric.io deprecated. use Firebase Crashlytics.

Atendra Singh
  • 396
  • 3
  • 9