Unable to get dependencies from jcenter with a new project
Solution 1
jcenter is currently down. In the end adding mavenCentral()
to both sets of repositories in the project build.gradle
file worked as a workaround for me:
buildscript {
repositories {
mavenCentral()
google()
jcenter()
...
allprojects {
repositories {
mavenCentral()
google()
jcenter()
...
Solution 2
Downgrade Gradle version is not a good fix for me. I did google around and found this. Jcenter is dead. For now.
https://status.bintray.com/?fbclid=IwAR3NLsnuGA5xqbFhcPsVLWX2c9TG40JWQcDYM7RTVsDm0qDSQvfjmhabhPg
I think all we can do is wait.
Solution 3
While mostly meant as a temporary, change-back-again-when-jcenter-is-working solution, this can be fixed by downgrading the gradle plugin version to 3.3.1 in the project's gradle file:
classpath 'com.android.tools.build:gradle:3.3.1'
Solution 4
replace jcenter() with mavenCentral() because jcenter is not available now
Solution 5
There is a problem in Downloads
section with Partial Outage
in jfrog bintray (https://status.bintray.com/incidents/2wvx6d5f807c):
Intermittent download issues in Bintray
You can see the current status in https://status.bintray.com/
Update Status from jfrog Bintray:
Update - There are still intermittent download issues in Oregon region (north America). We are still working on identifying the root cause.
Mar 21, 10:02 UTC
Related videos on Youtube
user8810083
Updated on June 11, 2022Comments
-
user8810083 about 2 years
I'm unable to get kotlin pom from jcenter with a new project.
All I have done is gone File->New Project and created a new project with no activity.
I'm getting the following error when it tries to build:
ERROR: Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.21/kotlin-stdlib-jdk8-1.3.21.pom'. Received status code 502 from server: Bad Gateway Enable Gradle 'offline mode' and sync project
My build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.3.2' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { google() jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }
If I go in my web browser to that URL I can't connect either. https://jcenter.bintray.com/
Does this mean the site is temporarily down or is there something I need to add to my build files?
BTW I selected Java for the project and not Kotlin on setup if that matters so not even sure why it's trying to get kotlin stuff.
-
Chisko over 5 yearsI'm experiencing this as well and thought it was very weird. Since I'm not the only one, I'm thinking it may be temporary
-
Alfred Angkasa over 5 yearsmaybe we should not upgrade the gradle to 3.3.2 yet
-
-
Chisko over 5 yearsMaybe the OP doesn't need Kotlin support
-
Saurabh over 5 years@Chisko I'm still getting the same error as OP
-
user8810083 over 5 yearsthis didn't work for me, but see the answer I just posted. Just adding mavenCentral() to both sets of repositories works for me now
-
user8810083 over 5 yearssee the answer I just posted. Just adding mavenCentral() to both sets of repositories works for me now
-
Benjamin over 5 yearsThe server is broken! I did a completely fresh install of android studio and can't create a new project
-
MateenSheikh over 5 yearsNot working for me.
-
Vikas Kumar over 5 yearsthis gives me a read timeout error.
-
user8810083 over 5 years@MateenSheikh , do you still get the same error? What does your build file look like?
-
user8810083 over 5 years@Benjamin , adding mavenCentral as repository is a workaround for now
-
MateenSheikh over 5 years@user8810083 jcenter is working fine now so issue is resolved.