react-native-background-fetch: Could not determine the dependencies of task ':app:processDebugResources'.

🚀 [UPDATE] Solution 🚀

📂 android/build.gradle

allprojects {
    repositories {
+       mavenLocal()
+       mavenCentral()
        // Required for react-native-background-geolocation
        maven { url("${project(':react-native-background-geolocation').projectDir}/libs") }
        maven { url 'https://developer.huawei.com/repo/' }
        // Required for react-native-background-fetch
        maven { url("${project(':react-native-background-fetch').projectDir}/libs") }
    }
}

Your Environment

  • Plugin version: 4.1.10
  • Platform: Android
  • OS version: 12
  • Device manufacturer / model: Pixel 5
  • React Native version (react-native -v):0.72.3
  • Plugin config

Expected Behavior

After installation app should work

Actual Behavior

After installation throw an error

Steps to Reproduce

  1. add maven { url “https://oss.sonatype.org/content/repositories/snapshots/” }
  2. clear cache clean and rebuild

Context

I tried to implement the sample code

Debug logs

Could not determine the dependencies of task ‘:app:processDebugResources’.

Could not resolve all task dependencies for configuration ‘:app:debugRuntimeClasspath’. Could not find any matches for com.transistorsoft:tsbackgroundfetch:+ as no versions of com.transistorsoft:tsbackgroundfetch are available. Searched in the following locations: - https://oss.sonatype.org/content/repositories/snapshots/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml - https://repo.maven.apache.org/maven2/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml - file:/Users/khalif/Documents/WakeupOnDestination/node_modules/jsc-android/dist/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml - https://dl.google.com/dl/android/maven2/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml - https://www.jitpack.io/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml - file:/Users/khalif/Documents/WakeupOnDestination/node_modules/@notifee/react-native/android/libs/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml Required by: project :app > project :react-native-background-fetch

Possible solution:

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 15 (7 by maintainers)

Most upvoted comments

Today I upgraded the SampleApp from RN 0.68.5 -> 0.72.4.

It does not require any extra repositories in allprojects/repositories

allprojects {
    repositories {
        // It's been reported that some people might require mavenLocal() repo here.
        // I leave it disabled for now.
        //mavenLocal()

        // Required for react-native-background-geolocation
        maven { url("${project(':react-native-background-geolocation').projectDir}/libs") }
        maven { url 'https://developer.huawei.com/repo/' }
        // Required for react-native-background-fetch
        maven { url("${project(':react-native-background-fetch').projectDir}/libs") }
    }
}