简体   繁体   中英

Failed to resolve: com.crashlytics.sdk.android:crashlytics:2.6.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?

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' } 
}

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM