androidreact-nativemavengradlejitpack

React Native gradle build error using jitpack


My build pipeline gives an error, when I check the status of jitpack it is nearly always down. Would jitpack being down cause the error and could I remove or replace jitpack with something else?

Execution failed for task ‘:@adobe_react-native-acpanalytics:mergeReleaseResources’.
> Could not resolve all files for configuration ‘:@adobe_react-native-acpanalytics:releaseRuntimeClasspath’.
   > Could not resolve com.adobe.marketing.mobile:analytics:1.+.
     Required by:
         project :@adobe_react-native-acpanalytics
      > Failed to list versions for com.adobe.marketing.mobile:analytics.

My build.gradle has the following:

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-background-fetch
            url("${project(':react-native-background-fetch').projectDir}/libs")
        }        

        google()
        jcenter()
        maven { url 'https://jitpack.io' }
    }
}

Solution

  • I had issues with JCenter() and mavenCentral() so I used this,

    allprojects {
        repositories {
            // Jcenter mirror
            maven { url "https://maven.aliyun.com/repository/jcenter" }
            // ...other repos
        }
    }
    

    The react native project I am working on is very old and has many outdated dependencies