skip to Main Content

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


  1. Currently jcenter down

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

     repositories {
            google()
            mavenCentral()
        }
    
    Login or Signup to reply.
  2. As from here, replace jcenter() with mavenCentral() in your android/app/build.gradle.

    Login or Signup to reply.
  3. 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search