Closed khuongsatou closed 3 years ago
i checked https://stackoverflow.com/questions/49510176/android-studio-gradle-sync-failed-could-not-head-received-status-code-5 but it not working
It seems Jcenter downloads are down, please check https://status.bintray.com
Jcenter is shutting down. Maybe they are trying to warn us to switch. See https://github.com/react-native-community/discussions-and-proposals/issues/331
Just run with offline mode. Turn off your connection, run-android and turn it on back.
Is it another way to replace Jcenter to MavenCentral manually since jcenter getting server error now , and since jCenter is shutting down and affect Android apps globally starting May
@arwysyah i think jCenter extended their support till 1st Feb 2022
same issue here :(
@ydv0121
Ah i see ,only Rest Api and UI will be sunsetted on May
βTo clarify, the JCenter repository will keep serving packages for 12 months until February 1st 2022. Only the JCenter REST API and UI will be sunsetted on May 1st 2021.β
JCenter is up now.
it worked
you can close the issue
Just run with offline mode. Turn off your connection, run-android and turn it on back.
Excellent. Thank you :) You have saved my time.
I've just started having this issue today, I checked https://status.bintray.com and it seems jcenter and bintray have already been sunset even though the date was 1 Feb 2022. What can I do to fix this issue, besides for offline mode?
@Lexical-Luke you need to update your build.gradle
Remove or disable jcenter() and change it to mavenCentral() android/build.gradle repositories { mavenLocal()
// jcenter() // <- remove it mavenCentral() // <- add it
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://repo.spring.io/plugins-release/" }
}
@arwysyah, I've tried these but I still get the same issue.
Here is the android/build.gradle
allprojects {
repositories {
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
maven {
// react-native-date-picker
url "https://www.jitpack.io"
}
google()
mavenCentral()
maven { url "https://maven.google.com" }
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://repo.spring.io/plugins-release/" }
}
}
Sorry bro ,currently i didnt open my Laptop , But here the things
maybe you should update your React Native version, currently 0.65 already replaced jcenter()
and here some references, hope can help you:
@arwysyah @Lexical-Luke I'm getting similar issue:
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from https://cardinalcommerce.bintray.com/android/com/facebook/react/react-native/maven-metadata.xml.
> Could not get resource 'https://cardinalcommerce.bintray.com/android/com/facebook/react/react-native/maven-metadata.xml'.
> Could not GET 'https://cardinalcommerce.bintray.com/android/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
build.gradle
buildscript {
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
supportLibVersion = "28.0.0"
googlePlayServicesVersion = "11.0.0"
googlePlayServicesLocationVersion = "17.0.0"
appCompatVersion = "1.1.0"
}
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath("com.android.tools.build:gradle:4.1.0")
classpath("com.google.gms:google-services:4.3.10")
}
}
allprojects {
repositories {
mavenCentral()
mavenLocal()
maven { url("$rootDir/../node_modules/react-native/android") }
maven { url("$rootDir/../node_modules/jsc-android/dist") }
google()
maven { url 'https://www.jitpack.io' }
jcenter()
flatDir {
dirs "$rootProject.projectDir/libs"
}
maven {
url "$rootDir/../node_modules/@notifee/react-native/android/libs"
}
maven {
url "https://cardinalcommerceprod.jfrog.io/artifactory/android"
credentials {
username 'braintree_team_sdk'
password 'AKCp8jQcoDy2hxSWhDAUQKXLDPDx6NYRkqrgFLRc3qDrayg6rrCbJpsKKyMwaykVL8FWusJpp'
}
}
}
}
The problem appeared without any code changes. Bintray status is major outage: https://isdown.app/integrations/bintray
Please advise, which steps do I need to perform, so I can successfully create release builds.
@arwysyah, I made sure to take my time and check everything, I tried all 3 of your points independently then all together, even tried some other tricks like running $ npm ls metro-config
and trying to resolve those issues, I'm still left with the same issue if not more of the same.
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from https://repo.spring.io/plugins-release/com/facebook/react/react-native/maven-metadata.xml.
> Could not get resource 'https://repo.spring.io/plugins-release/com/facebook/react/react-native/maven-metadata.xml'.
> Could not GET 'https://repo.spring.io/plugins-release/com/facebook/react/react-native/maven-metadata.xml'. Received status code 401 from server: Unauthorized
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
Here is my android/build.gradle:
buildscript {
ext {
buildToolsVersion = "30.0.3"
minSdkVersion = 21
kotlinVersion = "1.3.72"
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "20.1.5948944"
}
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.2'
classpath 'com.google.gms:google-services:4.3.10'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
}
}
allprojects {
repositories {
google()
mavenLocal()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://repo.spring.io/plugins-release/" }
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
maven {
// react-native-date-picker
url 'https://www.jitpack.io'
}
maven { url "https://maven.google.com" }
}
}
@Lexical-Luke Same for me. The issue persists for 2 days already and it seems like the server is down: https://isdown.app/integrations/bintray
@Lexical-Luke its looks like you already solved the problem , and i think better for you to change your credential account @latusdenis
@arwysyah, Definitely not solved & those are @latusdenis's creds.
Hmm okay i see π€, @Lexical-Luke @latusdenis
i found an article in OneSignal website
Its sounds reasonable that there are some libs maybe havent changed to mavenCentral() on your project .
I havent tried on my laptop
but if you want to try it
delete your modules and reinstall
And here is the complete article : https://www.google.co.id/amp/s/onesignal.com/blog/android-migrate-jcenter-to-maven-central/amp/
@arwysyah, I've done that literally hundreds of times, its the first thing I do before a clean install, also ./gradlew clean
.
I'm using https://github.com/wgltony/react-native-braintree-dropin-ui, so should the lib move to mavenCentral()
?
@Lexical-Luke ππ, but how if you create a new project and trying to run it ? Is it running correctly ( react native latest version)? Sometimes its possible to get and error because of gradle because of network connection when sync the gradle , but for your case i think its not . π€
@latusdenis i think the libs already implemented mavenCentral () too . But i never used that lib, so really sorry for that.
I am searching by phone cause i am on leave πππ»
@arwysyah, our dev team has other apps, this is the only one affected, the others are on RN 0.64.0. This one, that is having issues, was on RN 0.63.4, I've since upgraded it to 0.65.0.
Interestingly enough those apps still reference jcenter() in the build.gradle.
I'm still getting this error:
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
Any help would be appreciated.
@Lexical-Luke i just tried to look into detail your problem ,flexbox-layout releases appear to only be published to jcenter and are not present on maven central. Remove
maven { url "https://google.bintray.com/flexbox-layout" }// remove this one if exist
Try this :
dependencies { implementation 'com.google.android.flexbox:flexbox:3.0.0' } //add this one
For detail information:
https://github.com/google/flexbox-layout/issues/566#issuecomment-844630491
@latusdenis i dont know if you already solved the problem or not, i guess you issue also because https://cardinalcommerceprod.jfrog.io/ ,
i found this article https://cardinaldocs.atlassian.net/wiki/spaces/CMSDK/pages/1998914459/Setting+up+CardinalMobileSDK+-+Android+-+V+2.2.5 Idont know it would help you or not, i cause i never used the lib and sdk
if bug still appear :maybe we can open the issue
@arwysyah, thanks for the leads, unfortunately, I've already tried them out - same error.
I can't test that second article relating to jfrog as there doesn't seem to be an option to create an account.
@Lexical-Luke How if you change your internet connection, sometimes its also possible to happened because of your network connection didnt have a proxy π€ https://github.com/google/flexbox-layout/issues/566#issuecomment-850954633 (Kotlin)
@arwysyah, unfortunately, I don't have a VPN to try out some net config, I tried connecting through my phone's wifi, and still no luck, my colleague has the same issue and we both work from home (different networks).
Here is my current build.gradle, I am currently using kotlinVersion = "1.4.32", I'm not sure if additional steps are required.
buildscript {
ext {
buildToolsVersion = "31.0.0"
minSdkVersion = 21
kotlinVersion = "1.4.32"
supportLibVersion = "30.0.0"
supportVersion = "30.0.0"
compileSdkVersion = 31
targetSdkVersion = 31
ndkVersion = "21.4.7075529"
RNNKotlinVersion = kotlinVersion
}
repositories {
google()
mavenCentral()
mavenLocal()
// jcenter()
}
dependencies {
classpath ("com.android.tools.build:gradle:4.1.2")
classpath 'com.google.gms:google-services:4.3.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
mavenLocal()
// jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup "com.facebook.react"
}
}
google()
maven {
// react-native-date-picker
url "https://jitpack.io"
}
maven { url "https://maven.google.com" }
}
}
Have you tried this one :
There is no flexbox on Maven Central. There is a flexbox on Google's Maven repo, but only 3.0.0. Some transitive dependency of yours is seeking 2.0.1. And, based on that dependency list, it must be io.kommunicate.sdk:kommunicateui:2.1.8 that is looking for the older flexbox.
Unfortunately, the developers of io.kommunicate.sdk:kommunicateui have not updated their library, apparently.
You can try manually adding your own dependency on com.google.android.flexbox:flexbox:3.0.0 and perhaps setting up an exclude rule on the io.kommunicate.sdk:kommunicateui:2.1.8 dependency to tell Gradle to ignore its transitive dependency on flexbox. Ideally, the developers of io.kommunicate.sdk:kommunicateui would update their library to depend on com.google.android.flexbox:flexbox:3.0.0.
To exclude the failing dependency, change:
implementation 'io.kommunicate.sdk:kommunicateui:2.1.8' to:
implementation('io.kommunicate.sdk:kommunicateui:2.1.8') { exclude group: "com.google.android", module: "flexbox" }
ππ
@arwysyah, you may be on the right track we are using kommunicate and it has been a problem child in the past π₯΄
We have this in the app/build.gradle:
implementation project(':react-native-kommunicate-chat')
I changed it to your suggestion and the only thing that has changed is the build time fails twice as fast π - same error.
@Lexical-Luke I saw they module/libs , its looks like they havent changed the version of flexbox ,still from old version, i was wondering have you tried to changed from their libs that exist on your project ? I saw also on Zendesk they have a same issue before , but i dont know ππ,since my suggestion always got failed π.
here the pict from the libs/module :
@arwysyah, Interesting results.. Don't worry about things not working so far, you've been hitting all the points I also thought would work, you're a king for trying π
build.gradle
allprojects {
repositories {
mavenCentral()
mavenLocal()
// jcenter()
maven {url "https://kommunicate.jfrog.io/artifactory/kommunicate-android-sdk"}
maven {url "https://google.bintray.com/flexbox-layout"}
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup "com.facebook.react"
}
}
google()
maven {
// react-native-date-picker
url "https://jitpack.io"
}
maven { url "https://maven.google.com" }
}
}
The fancy new error:
> Task :app:mergeReleaseAssets FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeReleaseAssets'.
> Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
> Could not resolve com.google.firebase:firebase-bom:29.0.0.
Required by:
project :app
> Could not resolve com.google.firebase:firebase-bom:29.0.0.
> Could not get resource 'https://google.bintray.com/flexbox-layout/com/google/firebase/firebase-bom/29.0.0/firebase-bom-29.0.0.pom'.
> Could not HEAD 'https://google.bintray.com/flexbox-layout/com/google/firebase/firebase-bom/29.0.0/firebase-bom-29.0.0.pom'. Received status code 502 from server: Bad Gateway
> Could not resolve com.google.firebase:firebase-bom:29.0.0.
Required by:
project :app > project :react-native-firebase_analytics
project :app > project :react-native-firebase_app
project :app > project :react-native-firebase_auth
project :app > project :react-native-firebase_firestore
> Could not resolve com.google.firebase:firebase-bom:29.0.0.
> Could not get resource 'https://google.bintray.com/flexbox-layout/com/google/firebase/firebase-bom/29.0.0/firebase-bom-29.0.0.pom'.
> Could not HEAD 'https://google.bintray.com/flexbox-layout/com/google/firebase/firebase-bom/29.0.0/firebase-bom-29.0.0.pom'. Received status code 502 from server: Bad Gateway
> Could not resolve com.google.firebase:firebase-auth.
Required by:
project :app > project :react-native-firebase_auth
> Skipped due to earlier error
> Skipped due to earlier error
> Could not resolve com.google.firebase:firebase-firestore.
Required by:
project :app > project :react-native-firebase_firestore
> Skipped due to earlier error
> Skipped due to earlier error
build.gradle
allprojects {
repositories {
maven {url "https://kommunicate.jfrog.io/artifactory/kommunicate-android-sdk"}
maven {url "https://google.bintray.com/flexbox-layout"}
mavenCentral()
mavenLocal()
// jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup "com.facebook.react"
}
}
google()
maven {
// react-native-date-picker
url "https://jitpack.io"
}
maven { url "https://maven.google.com" }
}
}
The fancy new error:
* What went wrong:
Could not determine the dependencies of task ':react-native-webview:compileReleaseKotlin'.
> Could not resolve all files for configuration ':react-native-webview:kotlinCompilerClasspath'.
> Could not resolve org.jetbrains.kotlin:kotlin-compiler-embeddable:1.4.32.
Required by:
project :react-native-webview
> Could not resolve org.jetbrains.kotlin:kotlin-compiler-embeddable:1.4.32.
> Could not get resource 'https://google.bintray.com/flexbox-layout/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.4.32/kotlin-compiler-embeddable-1.4.32.pom'.
> Could not HEAD 'https://google.bintray.com/flexbox-layout/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.4.32/kotlin-compiler-embeddable-1.4.32.pom'. Received status code 502 from server: Bad Gateway
build.gradle
allprojects {
repositories {
mavenCentral()
mavenLocal()
// jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup "com.facebook.react"
}
}
google()
maven {
// react-native-date-picker
url "https://jitpack.io"
}
maven { url "https://maven.google.com" }
maven {url "https://kommunicate.jfrog.io/artifactory/kommunicate-android-sdk"}
maven {url "https://google.bintray.com/flexbox-layout"}
}
}
The same old error:
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
@Lexical-Luke
implementation 'com.google.android.flexbox:flexbox:3.0.0' Using this instead of maven {url "https://google.bintray.com/flexbox-layout"} inside your project and their libs(kommunicate-react-native-sdk) Like this : https://github.com/facebook/react-native/issues/31165#issuecomment-992545410 did you changed the firebase version ? How about using βcom.google.gms:google-services:4.3.10β ?
@arwysyah, I'm not sure about the firebase version. I tried βcom.google.gms:google-services:4.3.10β
it doesn't change the result.
I tried removing Firebase version: implementation platform('com.google.firebase:firebase-bom:29.0.0')
and made it implementation platform('com.google.firebase:firebase-bom')
then I got the original error:
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/flexbox-layout/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
package.json:
"@react-native-firebase/analytics": "^12.8.0",
"@react-native-firebase/app": "^12.8.0",
"@react-native-firebase/auth": "^12.8.0",
"@react-native-firebase/firestore": "^12.8.0",
"firebase": "^7.23.0",
"firebase-admin": "^8.12.0",
app/build.gradle:
dependencies {
// implementation "org.webkit:android-jsc:+"
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation platform('com.google.firebase:firebase-bom:29.0.0')
implementation project(':react-native-gesture-handler')
implementation project(':react-native-linear-gradient')
// implementation project(':react-native-kommunicate-chat')
// implementation 'io.kommunicate.sdk:kommunicateui:2.1.8'
implementation('io.kommunicate.sdk:kommunicateui:2.1.8') {
exclude group: "com.google.android", module: "flexbox"
}
implementation 'com.google.android.flexbox:flexbox:3.0.0'
// implementation("com.github.google:flexbox-layout:2.0.1")
implementation "com.facebook.react:react-native:+" // From node_modules
// implementation("com.facebook.react:react-native:0.65.0") { force = true }
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-messaging:20.0.1'
implementation 'com.google.firebase:firebase-iid:20.0.1'
implementation project(':react-native-notifications')
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
}
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
}
@Lexical-Luke
. I think no need to remove firebase.bom version , cause this β implementation platform('com.google.firebase:firebase-bom:29.0.0')β the correct version that exist on firebas doc ,
hmm π€π€ weird , i checked the flexbox already on maven also Here : https://maven.google.com/web/m_index.html?q=Flex#com.google.android.flexbox:flexbox:3.0.0
@arwysyah, can we open up the issue again? So far I've gone full circle down that rabbit hole. I read through each of the 126 comments in issuetracker tried out a bunch of things and even tried upgrading Gradle and a few dependencies, I've now got the same issue I started with...
@Lexical-Luke yeah we can reopen this issue , and also better for you to investigate your 3rd party libs since your upgraded the project version or create a new issue i guess and mentioned this issue because its still related i guess π.
@arwysyah, we're currently in the process, opened a ticket with kommunicate and we are checking all our packages, have to try everything to get our app to build again π
I am able to resolve it. Update the packages to latest version whatever package you are receiving 502.
@gopidevarapalli and this error?
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from https://cardinalcommerce.bintray.com/android/com/facebook/react/react-native/maven-metadata.xml.
> Could not get resource 'https://cardinalcommerce.bintray.com/android/com/facebook/react/react-native/maven-metadata.xml'.
> Could not GET 'https://cardinalcommerce.bintray.com/android/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
Hi Lexical-Luke, Remove maven { url('https://cardinalcommerce.bintray.com/maven') } from build.gradle and try
I am facing similar issue:
Could not resolve all task dependencies for configuration ':react-native-intercom:releaseRuntimeClasspath'. Could not resolve com.facebook.react:react-native:+. Required by: project :react-native-intercom Failed to list versions for com.facebook.react:react-native. Unable to load Maven meta-data from https://dl.bintray.com/intercom/intercom-maven/com/facebook/react/react-native/maven-metadata.xml. Could not get resource 'https://dl.bintray.com/intercom/intercom-maven/com/facebook/react/react-native/maven-metadata.xml'. Could not GET 'https://dl.bintray.com/intercom/intercom-maven/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
Update on my previous issue: We were unable to fix/patch the previous issue and we decided to just start a massive cleanup, we got rid of loads of packages, even removed Intercom entirely and moved to gifted chat. Good luck.
I am facing similar issue:
- What went wrong: Could not determine the dependencies of task ':react-native-intercom:generateReleaseRFile'.
Could not resolve all task dependencies for configuration ':react-native-intercom:releaseRuntimeClasspath'. Could not resolve com.facebook.react:react-native:+. Required by: project :react-native-intercom
Failed to list versions for com.facebook.react:react-native. Unable to load Maven meta-data from https://dl.bintray.com/intercom/intercom-maven/com/facebook/react/react-native/maven-metadata.xml. Could not get resource 'https://dl.bintray.com/intercom/intercom-maven/com/facebook/react/react-native/maven-metadata.xml'. Could not GET 'https://dl.bintray.com/intercom/intercom-maven/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
Try to remove maven { url('https://dl.bintray.com/maven') } from build.gradle and check
I guess mostly your problem its because you are using intercom package
Try this : In the build.gradle file, it uses the following dependency under repositories:
maven { url 'https://dl.bintray.com/intercom/intercom-maven' }
UPDATE HERE!!
Yes, it worked. As below code was in node_modules, i can't delete that directly. After checking library(https://github.com/tinycreative/react-native-intercom) for updates, it was recently fixed. Code was removed in upgraded version.
Code that was causing issue: maven { url 'https://dl.bintray.com/intercom/intercom-maven' }
Please provide all the information requested. Issues that do not follow this format are likely to stall.
Description
Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest React Native release to make sure your issue has not already been fixed: https://reactnative.dev/docs/upgrading.html
React Native version:
Run
react-native info
in your terminal and copy the results here.Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
Expected Results
Describe what you expected to happen. [Could not GET 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. Received status code 502 from server: Bad Gateway]
Snack, code example, screenshot, or link to a repository:
Please provide a Snack (https://snack.expo.io/), a link to a repository on GitHub, or provide a minimal code example that reproduces the problem. You may provide a screenshot of the application if you think it is relevant to your bug report. Here are some tips for providing a minimal example: https://stackoverflow.com/help/mcve