无法解决:com.crashlytics.sdk.android :answers-shim:0.0.3

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了无法解决:com.crashlytics.sdk.android :answers-shim:0.0.3相关的知识,希望对你有一定的参考价值。

Hy我已经将android Studio更新到最新版本,因为我开始得到gradle sync问题:无法解决:com.crashlytics.sdk.android:answers-shim:0.0.3

我该如何解决?

这是我所拥有的gradle的内容

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'

请在项目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库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'
}

如果需要任何澄清,请告诉我

答案

这不是一个真正的aswer,而是一个解决此类或错误的提示:通常当你有一些依赖解析问题时,你需要了解这个依赖来自哪里,使用Gradle dependencies任务:

./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

所以在你的情况下,这个answers-shim模块是com.twitter.sdk.android:twitter模块传递依赖的一部分:你需要检查这个模块是否有更新的版本,因为版本1.14.1似乎已经过时并且依赖于公共存储库中不再可用的库。

以上是关于无法解决:com.crashlytics.sdk.android :answers-shim:0.0.3的主要内容,如果未能解决你的问题,请参考以下文章

文奇的WY实习连载日记4.11-车链子之解决不了的问题

ADB无法使用解决办法

google无法访问怎么简单的解决

电脑无法识别耳机怎么解决 电脑无法识别耳机解决方法

IINA“无法打开文件和流”解决

无法解决此问题:“无法按聚合分组”