question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build failed on android -

See original GitHub issue

Your Environment

  • Plugin version: 2.6.0
  • Platform: Android
  • OS version: Android 8.0.0
  • Device manufacturer / model: Samsung / SM-A520F
  • React Native version (react-native -v): 0.55.4
  • Plugin config
{
          minimumFetchInterval: 15, // <-- minutes (15 is minimum allowed)
          stopOnTerminate: false,   // <-- Android-only,
          startOnBoot: true         // <-- Android-only
        }

Expected Behavior

Should build.

Actual Behavior

  • What went wrong: Everything was working fine on plugin version 2.5.6. Now the android build fails with the stack trace below (please see logs).

Steps to Reproduce

  1. Install plugin version 2.6.0
  2. react-native unlink react-native-background-fetch
  3. react-native link react-native-background-fetch
  4. Review the configuration to match manual installation instructions
  5. build for android

Context

updating the plugin

Debug logs

Could not resolve all files for configuration ':react-native-background-fetch:debugCompileClasspath'.
> 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/myusername/Library/Android/sdk/extras/m2repository/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
      file:/Users/myusername/Library/Android/sdk/extras/m2repository/com/transistorsoft/tsbackgroundfetch/
      file:/Users/myusername/Library/Android/sdk/extras/google/m2repository/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
      file:/Users/myusername/Library/Android/sdk/extras/google/m2repository/com/transistorsoft/tsbackgroundfetch/
      file:/Users/myusername/Library/Android/sdk/extras/android/m2repository/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
      file:/Users/myusername/Library/Android/sdk/extras/android/m2repository/com/transistorsoft/tsbackgroundfetch/
      file:/Users/myusername/WebstormProjects/LetsJobItApp/react-native/node_modules/react-native-background-fetch/android/libs/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
      file:/Users/myusername/WebstormProjects/LetsJobItApp/react-native/node_modules/react-native-background-fetch/android/libs/com/transistorsoft/tsbackgroundfetch/0.2.0/tsbackgroundfetch-0.2.0.pom
      file:/Users/myusername/WebstormProjects/LetsJobItApp/react-native/node_modules/react-native-background-fetch/android/libs/com/transistorsoft/tsbackgroundfetch/0.2.0/tsbackgroundfetch-0.2.0.jar
      file:/Users/myusername/WebstormProjects/LetsJobItApp/react-native/node_modules/expokit/maven/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
      file:/Users/myusername/WebstormProjects/LetsJobItApp/react-native/node_modules/expokit/maven/com/transistorsoft/tsbackgroundfetch/
      file:/Users/myusername/WebstormProjects/LetsJobItApp/react-native/android/maven-test/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
      file:/Users/myusername/WebstormProjects/LetsJobItApp/react-native/android/maven-test/com/transistorsoft/tsbackgroundfetch/
      https://maven.google.com/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
      https://maven.google.com/com/transistorsoft/tsbackgroundfetch/
      https://jcenter.bintray.com/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
      https://jcenter.bintray.com/com/transistorsoft/tsbackgroundfetch/
      file:/Users/myusername/WebstormProjects/LetsJobItApp/react-native/home/node_modules/jsc-android/android/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
      file:/Users/myusername/WebstormProjects/LetsJobItApp/react-native/home/node_modules/jsc-android/android/com/transistorsoft/tsbackgroundfetch/
      file:/Users/myusername/WebstormProjects/LetsJobItApp/react-native/node_modules/react-native-background-fetch/android/libs/
      https://jitpack.io/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
      https://jitpack.io/com/transistorsoft/tsbackgroundfetch/
      file:/Users/myusername/.m2/repository/com/transistorsoft/tsbackgroundfetch/maven-metadata.xml
      file:/Users/myusername/.m2/repository/com/transistorsoft/tsbackgroundfetch/
  Required by:
      project :react-native-background-fetch

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

12reactions
Pitacommented, Jul 19, 2019

Managed to fix it for me:

android/build.gradle

allprojects {
    repositories {
        maven {
            url("$rootDir/../node_modules/react-native-background-fetch/android/libs")
        }
    }
}
0reactions
christocracycommented, Sep 19, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Failed to build project with Android studio - Stack Overflow
File->Other Settings->Default Project Structure · Under Project Settings: Project, set Project SDK as Android SDK. · Click Edit button · For Android SDK,...
Read more >
Why does a build fail in Android Studio even if I don't have any ...
There are several causes for gradle build fail in Android studio. Few reasons might be: * Dependencies added * Importing the project from...
Read more >
Different Ways to fix "Error running android: Gradle project ...
Method 1: Restarting your project using Invalidate Caches and Restart option · Method 2: Sync your project with Gradle files · Method 3:...
Read more >
Known issues with Android Studio and Android Gradle Plugin
Find out about current known issues with Android Studio and the Android Gradle Plugin.
Read more >
Gradle build failed with unknown error. Please see logs for the ...
I was using expo build:android but after upgrading to eas-build It is showing me this error : Android build failed: Gradle build failed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found