react-native
react-native copied to clipboard
Android build failed: 'Failed to list versions for com.facebook.react:react-native.'
Description
- What went wrong: Could not determine the dependencies of task ':app:compileDebugKotlin'.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'. Could not resolve com.facebook.react:react-native:+. Required by: project :app project :app > project :react-native-push-notification project :app > project :react-native-code-push project :app > project :react-native-async-storage_async-storage project :app > project :react-native-community_blur project :app > project :react-native-community_clipboard project :app > project :react-native-community_datetimepicker project :app > project :react-native-community_masked-view project :app > project :react-native-community_netinfo project :app > project :react-native-community_picker project :app > project :react-native-firebase_analytics project :app > project :react-native-firebase_app project :app > project :react-native-firebase_crashlytics project :app > project :sumsub_react-native-mobilesdk-module project :app > project :react-native-action-sheet project :app > project :react-native-appsflyer project :app > project :react-native-camera project :app > project :react-native-config project :app > project :react-native-device-info project :app > project :react-native-fbsdk-next project :app > project :react-native-file-viewer project :app > project :react-native-fs project :app > project :react-native-geolocation-service project :app > project :react-native-gesture-handler project :app > project :react-native-get-random-values project :app > project :react-native-haptic-feedback project :app > project :react-native-idfa project :app > project :react-native-image-crop-picker project :app > project :react-native-image-picker project :app > project :react-native-maps project :app > project :react-native-permissions project :app > project :react-native-safe-area-context project :app > project :react-native-screens project :app > project :react-native-set-soft-input-mode project :app > project :react-native-share project :app > project :react-native-shared-element project :app > project :react-native-sms-retriever project :app > project :react-native-splash-screen project :app > project :react-native-svg project :app > project :react-native-text-input-mask project :app > project :react-native-vector-icons project :app > project :react-native-version-number project :app > project :react-native-webview project :app > project :react-native-yamap > Failed to list versions for com.facebook.react:react-native. > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml. > Could not HEAD 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. > Read timed out
Version
0.65.1
Output of npx react-native info
System: OS: macOS 13.0 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 55.72 MB / 16.00 GB Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.17.1 - ~/.nvm/versions/node/v16.17.1/bin/node Yarn: 3.1.1 - /usr/local/bin/yarn npm: 8.16.0 - ~/WebstormProjects/mono-front/node_modules/.bin/npm Watchman: 2022.08.15.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - /Users/magdaaa/.rvm/gems/ruby-2.7.4/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 16.0, macOS 12.3, tvOS 16.0, watchOS 9.0 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: 14.0.1/14A400 - /usr/bin/xcodebuild Languages: Java: 11.0.16 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.65.1 => 0.65.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
start to build android app
- react-native run-android
Snack, code example, screenshot, or link to a repository
build.gradle
dependencies { ... implementation "com.facebook.react:react-native:+" ... }
You're not alone, experiencing same error
BUILD FAILED in 1m 47s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
- What went wrong: Could not determine the dependencies of task ':app:mergeDebugAssets'.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. Could not resolve com.facebook.react:react-native:+. Required by: project :app project :app > project :notifee_react-native project :app > project :react-native-community_masked-view project :app > project :react-native-firebase_app project :app > project :react-native-firebase_messaging project :app > project :react-native-picker_picker project :app > project :react-native-aes-crypto project :app > project :react-native-biometrics project :app > project :react-native-camera project :app > project :react-native-device-info project :app > project :react-native-document-picker project :app > project :react-native-document-scanner-plugin project :app > project :react-native-file-access project :app > project :react-native-gesture-handler project :app > project :react-native-get-random-values project :app > project :react-native-image-crop-picker project :app > project :react-native-mlkit-ocr project :app > project :react-native-permissions project :app > project :react-native-safe-area-context project :app > project :react-native-screens project :app > project :react-native-splash-screen project :app > project :react-native-svg project :app > project :react-native-vector-icons project :app > project :realm > Failed to list versions for com.facebook.react:react-native. > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml. > Could not HEAD 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'. > Read timed out
Steps to reproduce are the same.
I get a similar error with an expo managed rn app:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':react-native-pager-view:verifyReleaseResources'.
> Could not resolve all task dependencies for configuration ':react-native-pager-view:releaseRuntimeClasspath'.
> Could not resolve com.facebook.react:react-native:+.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
Required by:
project :react-native-pager-view
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
> Failed to list versions for com.facebook.react:react-native.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml.
> Could not HEAD 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
> Read timed out
Same! No libs were changed either :/
JCenter and Bintray shut down today.
Do you have a resource that states this that you can share with us?
I'm also getting the same error (version 0.66.4). anyone know what should we do?
@olcaneristi Probably going to have to change where were fetching these deps from in the build process because JCenter and Bintray aren't working.
@louniss I can't find any resources that state JCenter and Bintray being shutdown today? I found something that mentions being shutdown Feb 1st 2022, but were now way past that date
I was able to fix my build. Apparently jcenter is down. It was already deprecated for some time now. I am not sure if it is finally down forever now or if this is temporary.
I had to update all dependencies that still used jcenter to the newest version. Most of them replaced jcenter with maven already. One I had to manually patch with https://github.com/ds300/patch-package myself.
After that my build worked again.
@mauricedoepke hopefully this is just temp otherwise a fix is going to have to be made in all these RN pkgs
@olcaneristi
https://bintray.com/ says 410 gone and https://jcenter.bintray.com/ says 403 forbidden
edit: to those who are confused
410 Gone The HyperText Transfer Protocol (HTTP) 410 Gone client error response code indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent.
Hey everyone,
I tweaked a few things in my build.gradle
file to emulate what this build.gradle
looks like and my build errors went away
remove jcenter
references and use mavenCentral
Hope this fixes everyone :)
@stephanrotolante can you help me share your complete build.gradle ?. because i already remove jcenter but still got error. Thanks
I had to comment out the jcenter()
commands in build.gradle
. If it is required by any of your libraries, you would need to check if there is a newer version of the library, which does not need it.
Obviously, you will need to delete the following folders (if any of them exists) before trying to rebuild your app.
android/.grdale
, android/.idea
, android/build
& android/app/build
It may be stupid but work for me it is replace all jcenter() in your project even node_module by mavenCentral()
@nyomanyudis95 try running a gradle clean, then rebuild
buildscript {
ext {
buildToolsVersion = "30.0.3"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
androidXCore = "1.7.0"
kotlinVersion = "1.6.0"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath('com.android.tools.build:gradle:7.1.2')
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
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")
}
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 { url 'https://www.jitpack.io' }
}
}
I'm having the same problem
I'm having the same problem
@a554878526 @orchsik
jcenter has shutdown in the last 24 hours I think.
You should grep "jcenter"
and see which modules in your project contain references to it still. Upgrade those packages, if they have fixed it in a new release, or replace jcenter
with mavenCentral
in the package files yourself and use patch-package
to maintain the change
I've just finished doing this and found many packages actually fixed this and just required an update to the version of those packages.
GL ✌️
I had to comment out the
jcenter()
commands inbuild.gradle
. If it is required by any of your libraries, you would need to check if there is a newer version of the library, which does not need it.Obviously, you will need to delete the following folders (if any of them exists) before trying to rebuild your app.
android/.grdale
,android/.idea
,android/build
&android/app/build
Hello,
I am still facing the same issue when building new release app, works pretty well with debug app Looking for an update really soon.
Thanks!
Hello,
Same problem, in my case I can't replace jcenter
with mavenCentral
because I need it for some old libraries.
It worked using [proselin] solution.. Replace jcenter
with mavenCentral
in all node_modules
BTW its already work for me just delete jcenter in build.gradle. After that you need to look carefully about what package that make your app dont run . For example i have problem like this after delete jcenter.
- What went wrong: Could not determine the dependencies of task ':app:processDebugResources'. > Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. > Could not find org.webrtc:google-webrtc:1.0.25003. Searched in the following locations: - file:/Users/nyomanyudis/Desktop/projectKantor/PlayToraFE3/play-tora-fe/node_modules/react-native/android/org/webrtc/google-webrtc/1.0.25003/google-webrtc-1.0.25003.pom - file:/Users/nyomanyudis/Desktop/projectKantor/PlayToraFE3/play-tora-fe/node_modules/jsc-android/dist/org/webrtc/google-webrtc/1.0.25003/google-webrtc-1.0.25003.pom - https://repo.maven.apache.org/maven2/org/webrtc/google-webrtc/1.0.25003/google-webrtc-1.0.25003.pom - https://dl.google.com/dl/android/maven2/org/webrtc/google-webrtc/1.0.25003/google-webrtc-1.0.25003.pom - https://www.jitpack.io/org/webrtc/google-webrtc/1.0.25003/google-webrtc-1.0.25003.pom - file:/Users/nyomanyudis/Desktop/projectKantor/PlayToraFE3/play-tora-fe/node_modules/@notifee/react-native/android/libs/org/webrtc/google-webrtc/1.0.25003/google-webrtc-1.0.25003.pom - https://github.com/QuickBlox/quickblox-android-sdk-releases/raw/master/org/webrtc/google-webrtc/1.0.25003/google-webrtc-1.0.25003.pom Required by: project :app > project :quickblox-react-native-sdk > com.quickblox:quickblox-android-sdk-videochat-webrtc:3.9.1 .
My error said its error required by quickblox-react-native-sdk. So i need to check version of that package. If you upgrade package that cause trouble to latest version and still can't run. You need to think again about using that package because jcenter dont support anymore. Thanks
replacing jcenter to mavenCentral causes another error
`Could not determine the dependencies of task ':app:mergeDebugAssets'.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. Could not find com.eightbitlab:blurview:1.6.6. Searched in the following locations: - file:/Users/muhammadowais/workspace/kiriDating/node_modules/react-native/android/com/eightbitlab/blurview/1.6.6/blurview-1.6.6.pom - file:/Users/muhammadowais/workspace/kiriDating/node_modules/jsc-android/dist/com/eightbitlab/blurview/1.6.6/blurview-1.6.6.pom - https://maven.google.com/com/eightbitlab/blurview/1.6.6/blurview-1.6.6.pom - https://www.jitpack.io/com/eightbitlab/blurview/1.6.6/blurview-1.6.6.pom - https://repo.maven.apache.org/maven2/com/eightbitlab/blurview/1.6.6/blurview-1.6.6.pom - https://dl.google.com/dl/android/maven2/com/eightbitlab/blurview/1.6.6/blurview-1.6.6.pom Required by: project :app Could not find com.eightbitlab:blurview:1.6.6. Searched in the following locations: - file:/Users/muhammadowais/workspace/kiriDating/node_modules/react-native/android/com/eightbitlab/blurview/1.6.6/blurview-1.6.6.pom - file:/Users/muhammadowais/workspace/kiriDating/node_modules/jsc-android/dist/com/eightbitlab/blurview/1.6.6/blurview-1.6.6.pom - https://maven.google.com/com/eightbitlab/blurview/1.6.6/blurview-1.6.6.pom - https://www.jitpack.io/com/eightbitlab/blurview/1.6.6/blurview-1.6.6.pom - https://repo.maven.apache.org/maven2/com/eightbitlab/blurview/1.6.6/blurview-1.6.6.pom - https://dl.google.com/dl/android/maven2/com/eightbitlab/blurview/1.6.6/blurview-1.6.6.pom Required by: project :app > project :react-native-community_blur Could not find com.twitter.sdk.android:twitter-core:3.3.0. Searched in the following locations: - file:/Users/muhammadowais/workspace/kiriDating/node_modules/react-native/android/com/twitter/sdk/android/twitter-core/3.3.0/twitter-core-3.3.0.pom - file:/Users/muhammadowais/workspace/kiriDating/node_modules/jsc-android/dist/com/twitter/sdk/android/twitter-core/3.3.0/twitter-core-3.3.0.pom - https://maven.google.com/com/twitter/sdk/android/twitter-core/3.3.0/twitter-core-3.3.0.pom - https://www.jitpack.io/com/twitter/sdk/android/twitter-core/3.3.0/twitter-core-3.3.0.pom - https://repo.maven.apache.org/maven2/com/twitter/sdk/android/twitter-core/3.3.0/twitter-core-3.3.0.pom - https://dl.google.com/dl/android/maven2/com/twitter/sdk/android/twitter-core/3.3.0/twitter-core-3.3.0.pom Required by: project :app > project :react-native-twitter-signin_twitter-signin Could not find com.yqritc:android-scalablevideoview:1.0.4. Searched in the following locations: - file:/Users/muhammadowais/workspace/kiriDating/node_modules/react-native/android/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom - file:/Users/muhammadowais/workspace/kiriDating/node_modules/jsc-android/dist/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom - https://maven.google.com/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom - https://www.jitpack.io/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom - https://repo.maven.apache.org/maven2/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom - https://dl.google.com/dl/android/maven2/com/yqritc/android-scalablevideoview/1.0.4/android-scalablevideoview-1.0.4.pom Required by: project :app > project :react-native-video`
Could you guys try this and check if it works (in case you still using some library on jcenter)? So it seems not all jcenter repo down
jcenter {
content {
excludeGroup "com.facebook.react"
excludeGroup "net.minidev"
excludeGroup "com.nimbusds"
}
}
@mowaisch Did you try "@react-native-community/blur": "^4.2.0" ? If you do and install this problem disappear.
@doniwinata0309 after adding that
`Could not determine the dependencies of task ':app:mergeDebugAssets'.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'. Could not resolve com.facebook.android:facebook-android-sdk:13.+. Required by: project :app > project :react-native-fbsdk-next > Failed to list versions for com.facebook.android:facebook-android-sdk. > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/android/facebook-android-sdk/maven-metadata.xml. > Could not HEAD 'https://jcenter.bintray.com/com/facebook/android/facebook-android-sdk/maven-metadata.xml'. Received status code 502 from server: Bad Gateway `

After trying all the solutions above, now I get this. Really, JCenter and Bintray had to get shutdown today? Could you please find a way around for this? Issue faced when building new release app Thanks!
@jihokim2 I'm using same library https://www.npmjs.com/package/@react-native-community/blur
@mowaisch did u already put mavenCentral() on top of jcenter ? seems com.facebook.android:facebook-android-sdk is from mavencentral
@doniwinata0309 yes I did that so I need to remove that?