> Failed to list versions for com.google.http-client:google-http-client-android.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/google/http-client/google-http-client-android/maven-metadata.xml.
> Could not HEAD 'https://jcenter.bintray.com/com/google/http-client/google-http-client-android/maven-metadata.xml'.
> Read timed out
I was trying to build an Android app, but I got the above error. When I connect to “https://jcenter.bintray.com/com/google/http-client/google-http-client-android/maven-metadata.xml”, an nginx 403 error appears. Is JCenter down? What should I do?
CodePudding user response:
Yes, you are not alone. Jcenter seems down today.
My solution is change all the jCenter
to mavenCentral
from root/android/build.gradle
Also, don't forget the libraies node_module/*error libaray*/android/build.gradle
CodePudding user response:
I just meet this problem as well, I'm not quite sure why jcenter returns 403, but you can fix this problem by add mavenCentral()
before jcenter()
in repositories setting, like this:
repositories {
...
mavenCentral() // add this line
jcenter()
...
}
CodePudding user response:
I think mavenCentral is not the complete alternative to jcenter.
I'm using aliyun's mirror. replace jcenter()
with maven { url "https://maven.aliyun.com/repository/jcenter" }
.
Don't know if its accessible from outside of china, or does aliyun censorship some packages, or is it up to date.
CodePudding user response:
as a temperary measure, you can use mirror site
I solved it this way
allprojects {
repositories {
// Jcenter mirror
maven { url "https://maven.aliyun.com/repository/jcenter" }
// other repo
}
}