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

我在构建应用程序时遇到此错误,有什么解决方法吗?

4

1 回答 1

2

添加

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

于 2022-01-13T04:40:44.167 回答