简体   繁体   中英

Failed to resolve: com.crashlytics.sdk.android:answers-shim:0.0.3

I have updated the android Studio to the latest version since I started getting gradle sync issues:

Failed to resolve: com.crashlytics.sdk.android:answers-shim:0.0.3

How can I resolve it?

This is the content of the gradle I have

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion '28.0.3'
    useLibrary  'org.apache.http.legacy'

    defaultConfig {


        javaCompileOptions {
            annotationProcessorOptions {
                includeCompileClasspath true
                applicationId "com.XXXXX.YYYYYY"
                minSdkVersion 21
                targetSdkVersion 26
                multiDexEnabled true
            }
        }
    }

    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
        }
    }

    lintOptions {
        disable "ResourceType"
    }

    repositories {
        jcenter()
    }

}

dependencies {
    compile files('libs/icu4j-4_4_2_2.jar')
    compile files('libs/jsoup-1.6.3.jar')
    compile files('libs/ksoap2-android-assembly-2.6.0-jar-with-dependencies.jar')
    compile files('libs/zip4j_1.2.6.jar')
    compile 'com.android.support:multidex:1.0.3'
    compile('com.twitter.sdk.android:twitter:1.14.1@aar') {
        transitive = true;
    }
    compile 'com.facebook.android:facebook-android-sdk:4.38.1'

    // Google
    compile 'com.google.android.gms:play-services-auth:16.0.1'
    compile 'com.google.android.gms:play-services-appinvite:16.0.7'
    compile 'com.google.android.gms:play-services-ads:17.1.2'
    compile 'com.firebaseui:firebase-ui-database:0.4.0'
    compile project(':pdflibrary')

    //implementation
    implementation 'com.google.firebase:firebase-messaging:17.3.4'
    implementation 'com.google.firebase:firebase-core:16.0.6'
    implementation 'com.google.firebase:firebase-crash:16.2.1'
    implementation 'com.google.firebase:firebase-config:16.1.2'
    implementation 'com.google.firebase:firebase-auth:16.1.0'
    implementation 'com.google.firebase:firebase-database:16.0.5'   
}
apply plugin: 'com.google.gms.google-services'

Kindly find below the project build.gradle

buildscript {
    repositories {
        mavenCentral()
        jcenter()
        maven { url 'https://maven.fabric.io/public' }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'io.fabric.tools:gradle:1.+'
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
        classpath 'com.novoda:bintray-release:0.9'
        classpath 'com.google.gms:google-services:4.2.0'

    }

}

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

PDF Library build.gradle

apply plugin: 'com.android.library'
//apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'com.novoda.bintray-release'

android {
    compileSdkVersion 26
    buildToolsVersion '28.0.3'



    defaultConfig {


        javaCompileOptions {
            annotationProcessorOptions {
                includeCompileClasspath true
                minSdkVersion 21
                targetSdkVersion 26
                versionCode 1
                versionName '1'
            }
        }
   }

    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }

    repositories {
        jcenter()
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
}

publish {
    userOrg = 'thefinestartist'
    groupId = 'com.thefinestartist'
    artifactId = 'finestwebview'
    publishVersion = '1'
    desc = 'Beautiful and customizable Android Activity that shows web pages within an app.'
    website = 'https://github.com/TheFinestArtist/FinestWebView-Android'
}

This is not really an aswer but a tip to solve this kind or error: generally when you have some dependency resolution issues, you need to understand from where is this dependency coming from, using the Gradle dependencies task :

./gradlew dependencies 

Executing tasks: [dependencies]

[ ... ]

compile - Compile dependencies for 'main' sources (deprecated: use 'implementation' instead).
+--- com.android.support:multidex:1.0.3
+--- com.twitter.sdk.android:twitter:1.14.1
|    +--- com.twitter.sdk.android:tweet-ui:1.11.1
|    |    +--- com.twitter.sdk.android:twitter-core:1.7.0
|    |    |    +--- com.squareup.retrofit:retrofit:1.8.0
|    |    |    |    \--- com.google.code.gson:gson:2.3 -> 2.4
|    |    |    +--- io.fabric.sdk.android:fabric:1.3.12
|    |    |    \--- com.google.code.gson:gson:2.4
|    |    +--- io.fabric.sdk.android:fabric:1.3.12
|    |    +--- com.android.support:support-v4:23.1.1 -> 27.0.2
|    |    |    +--- com.android.support:support-compat:27.0.2
{ ... }               
|    |    \--- com.squareup.picasso:picasso:2.5.2
|    +--- com.twitter.sdk.android:twitter-core:1.7.0 (*)
|    +--- io.fabric.sdk.android:fabric:1.3.12
|    +--- com.digits.sdk.android:digits:1.11.1
|    |    +--- com.twitter.sdk.android:twitter-core:1.7.0 (*)
|    |    +--- io.fabric.sdk.android:fabric:1.3.12
|    |    +--- com.crashlytics.sdk.android:answers-shim:0.0.3 FAILED   // <=== here it is ...
|    |    \--- com.squareup.retrofit:retrofit-mock:1.8.0
|    |         \--- com.squareup.retrofit:retrofit:1.8.0 (*)
|    \--- com.twitter.sdk.android:tweet-composer:1.0.5
|         +--- com.twitter.sdk.android:twitter-core:1.6.8 -> 1.7.0 (*)
|         +--- com.twitter:twitter-text:1.13.0
|         +--- io.fabric.sdk.android:fabric:1.3.12
|         \--- com.squareup.picasso:picasso:2.5.2
+--- com.facebook.android:facebook-android-sdk:4.38.1

So in your case, this answers-shim module is part of the com.twitter.sdk.android:twitter module transitive dependencies: you need to check if there are some more recent versions of this module, as version 1.14.1 seems obsolete and depends on libraries that are no longer available on public repositories.

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