Help Center/ CodeArts Build/ FAQs/ Android Builds/ How Do I Deal With the Unstable Jcenter () Configured for a Project?
Updated on 2024-10-10 GMT+08:00

How Do I Deal With the Unstable Jcenter () Configured for a Project?

Symptoms

The following error information is recorded in the build task file:

Caused by: org.gradle.internal.resource.transport.http.HttpErrorStatusCodeException: Could not GET 'https://jcenter.bintray.com/org/apache/commons/commons-compress/1.8.1/commons-compress-1.8.1.pom'. Received status code 504 from server: Gateway Time-out

Cause Analysis

  • The network is abnormal and the dependent image repository cannot be connected.
  • The dependent image repository is abnormal.

Solution

You are advised to configure an open-source image site, which is stable and fast. The configuration method is as follows:

Go to the code repository on which build task depends and add the following code to the build.gradle file to configure the open-source image repository:

allprojects {
repositories {
maven {
url 'https://repo.xxcloud.com/repository/maven/'
}
jcenter()
}
}