无法解析 com.commonsware.cwac:saferoom.x:1.0.0

Could not resolve com.commonsware.cwac:saferoom.x:1.0.0

     Could not resolve all task dependencies for configuration ':app:crewforceReleaseRuntimeClasspath'.
   > Could not resolve com.commonsware.cwac:saferoom.x:1.0.0.
     Required by:
         project :app
      > Could not resolve com.commonsware.cwac:saferoom.x:1.0.0.
         > Could not get resource 'http://trovmbuildagt1:8081/artifactory/libs-release-local/com/commonsware/cwac/saferoom.x/1.0.0/saferoom.x-1.0.0.pom'.
            > Could not HEAD 'http://trovmbuildagt1:8081/artifactory/libs-release-local/com/commonsware/cwac/saferoom.x/1.0.0/saferoom.x-1.0.0.pom'.
               > Connect to trovmbuildagt1:8081 [trovmbuildagt1/208.64.239.185] failed: Connection timed out: no further information
      > Could not resolve com.commonsware.cwac:saferoom.x:1.0.0.
         > Could not get resource 'https://kotlin.bintray.com/kotlinx/com/commonsware/cwac/saferoom.x/1.0.0/saferoom.x-1.0.0.pom'.
            > Could not HEAD 'https://kotlin.bintray.com/kotlinx/com/commonsware/cwac/saferoom.x/1.0.0/saferoom.x-1.0.0.pom'. Received status code 502 from server: Bad Gateway

我在构建应用程序时遇到此错误,是否有解决办法?

添加

maven {
    url "https://s3.amazonaws.com/repo.commonsware.com"
}

在您的项目级别 gradle 文件中这样

allprojects {
    repositories {
        google()
        mavenCentral()
        maven {
            url "https://s3.amazonaws.com/repo.commonsware.com"
        }
    }
}

并尝试其他版本,例如 1.1.21.1.1

implementation 'com.commonsware.cwac:saferoom.x:1.1.2'

因为看起来 1.0.0 不可用。

参考 - https://github.com/commonsguy/cwac-saferoom/blob/master/README-original.markdown#installation