Help Center/ CodeArts Build/ FAQs/ Using Android for Build/ Jcenter() Configured for the Project Is Unstable
Updated on 2023-11-28 GMT+08:00

Jcenter() Configured for the Project Is Unstable

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()
}
}