添加 Firebase Crashlytics 时找不到 org.apache.httpcomponents:httpclient:4.5.6

Reg*_*_AG 1 java android firebase crashlytics

我删除了 Fabrics Crashlytics 以将其替换为 Firebase Crashlytics。

我按照这里提到的步骤操作:https : //firebase.google.com/docs/crashlytics/upgrade-sdk?platform=android

我收到错误:

Could not find org.apache.httpcomponents:httpclient:4.5.6.
Searched in the following locations:
  - https://dl.google.com/dl/android/maven2/org/apache/httpcomponents/httpclient/4.5.6/httpclient-4.5.6.pom
If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
Required by:
    project :myProject > com.google.firebase:firebase-crashlytics-gradle:2.1.1 > com.google.firebase:firebase-crashlytics-buildtools:2.1.1
Run Code Online (Sandbox Code Playgroud)

你知道如何解决这个问题吗?

谢谢。

Eug*_*rin 8

Google 的 Maven 存储库不跟踪org.apache.httpcomponents. 这可能有效:

buildscript {
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath "com.google.firebase:firebase-crashlytics-gradle:2.1.1"
    }
}
Run Code Online (Sandbox Code Playgroud)