jamesisaac / react-native-background-task

Periodic background tasks for React Native apps, cross-platform (iOS and Android), which run even when the app is closed.
MIT License
1.1k stars 111 forks source link

Could not determine the dependencies of task ':app:mergeDebugAssets' #86

Open shterev-soft opened 2 years ago

shterev-soft commented 2 years ago

The lib does not work on Android. I followed the documentation and this is the error from yarn android

* What went wrong:
Could not determine the dependencies of task ':app:mergeDebugAssets'.
> 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:
       - file:/Users/.../.m2/repository/com/transistorsoft/tsbackgroundfetch/
       - file:/Users/.../my-app/node_modules/react-native/android/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
       - file:/Users/.../my-app/node_modules/jsc-android/dist/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
       - file:/Users/.../my-app/node_modules/detox/Detox-android/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
       - https://usercentrics.jfrog.io/artifactory/usercentrics/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
       - https://dl.google.com/dl/android/maven2/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
       - https://jcenter.bintray.com/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
       - https://www.jitpack.io/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
     Required by:
         project :app > project :react-native-background-fetch

* 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.

Any ideas?

hammerstrike331 commented 2 years ago

In my case, the version of react-native-background-fetch was the problem. Please try below version. npm install react-native-background-fetch@2.0.x --save