react-native-background-geolocation: Could not find any matches for com.transistorsoft:tslocationmanager:+ as no versions of com.transistorsoft:tslocationmanager are available.

Your Environment

  • Plugin version: 2.12.2
  • Platform: Android
  • React Native version (react-native -v):0.51.0

Expected Behavior

I installed react-native-background-geolocation, linked it according to the documentation with react-native link and ran react-native run-android. Builds successfully on Ios but build fails on Android.

Actual Behavior


* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
   > Could not find any matches for com.transistorsoft:tslocationmanager:+ as no versions of com.transistorsoft:tslocationmanager are available.
     Required by:
         project :app > project :react-native-background-geolocation

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Steps to Reproduce

  1. react-native unlink react-native-background-geolocation
  2. react-native uninstall react-native-background-geolocation
  3. yarn add react-native-background-geolocation
  4. react-native link react-native-background-geolocation
  5. react-native link react-native-background-fetch

Context

I was trying to set up react-native-background-geolocation on an app.

Debug logs

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 24 (12 by maintainers)

Most upvoted comments

Did you read the Setup docs for react-Native link?

There’s a required manual step with a required maven url

Post your android/build.gradle

If I’m trying to use the key for another app, do I need to buy a new key?

Yes.

hey @christocracy, read through the thread. I have an expired order, I did create and use the key last year. If I’m trying to use the key for another app, do I need to buy a new key?

@christocracy my android/build.gradle file.

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    ext {
        googlePlayServicesLocationVersion = "19.0.1"
        buildToolsVersion = "30.0.2"
        minSdkVersion = 21
        compileSdkVersion = 30
        targetSdkVersion = 30
        ndkVersion = "20.1.5948944"
        appCompatVersion = "1.1.0" 
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle:4.2.1")

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        mavenCentral()
        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")
        }
        // react-native-background-geolocation START
        maven {
            // Required for react-native-background-geolocation
            url("${project(':react-native-background-geolocation').projectDir}/libs")
        }
        maven {
            // Required for react-native-background-fetch
            url("${project(':react-native-background-fetch').projectDir}/libs")
        }
        // react-native-background-geolocation END

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

Create a hello world app and follow the setup instructions.