1

Error getting while creating release build in react native

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':react-native-community_clipboard:verifyReleaseResources'.
> Could not resolve all task dependencies for configuration ':react-native-community_clipboard:releaseRuntimeClasspath'.
   > Could not resolve com.facebook.react:react-native:+.
     Required by:
         project :react-native-community_clipboard
      > 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 GET 'https://jcenter.bintray.com/com/facebook/react/react-native/maven-metadata.xml'.
               > Read timed out

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

Error found during release build in react native

3 Answers 3

1

Currently jcenter down

Solution try replace jCenter() to mavenCentral() to your project gradle

 repositories {
        google()
        mavenCentral()
    }
1
  • No it doesn't work. try using AndroidX. it won't resolve
    – M D P
    Commented Nov 2, 2022 at 1:58
1

As from here, replace jcenter() with mavenCentral() in your android/app/build.gradle.

0

Actually, based on the posted issue on Github a temporary solution could be like the following on the android/build.gradle file:

all { ArtifactRepository repo ->
  if(repo instanceof MavenArtifactRepository){
    def url = repo.url.toString()
    if (url.startsWith('https://jcenter.bintray.com/')) {
      remove repo
    }
  }
}

In my case, it was happing in one of node_modules's package and I used patch-package to keep the solution in the production.

Not the answer you're looking for? Browse other questions tagged or ask your own question.