transistorsoft / react-native-background-geolocation

Sophisticated, battery-conscious background-geolocation with motion-detection
http://shop.transistorsoft.com/pages/react-native-background-geolocation
MIT License
2.66k stars 426 forks source link

Could not find any matches for com.transistorsoft:tslocationmanager-v21:+ as no versions of com.transistorsoft:tslocationmanager-v21 are available. #2182

Closed stalteri closed 4 weeks ago

stalteri commented 1 month ago

Your Environment

Expected Behavior

App build succesfully

Actual Behavior

App does not build

Steps to Reproduce

  1. install plugin
  2. try to start app

Context

App does not builds after plugin installed

Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all dependencies for configuration ':app:debugCompileClasspath'.
   > Could not find any matches for com.transistorsoft:tslocationmanager-v21:+ as no versions of com.transistorsoft:tslocationmanager-v21 are available.
     Required by:
         project :app
         project :app > project :react-native-background-geolocation

build.gradle

buildscript {
    ext {
        buildToolsVersion = "34.0.0"
        minSdkVersion = 23
        compileSdkVersion = 34
        targetSdkVersion = 34
        ndkVersion = "26.1.10909125"
        kotlinVersion = "1.9.22"
        appCompatVersion    = "1.4.2"
        googlePlayServicesLocationVersion = "21.0.1"  
    }
    repositories {
        google()
        mavenCentral()

        maven { url 'https://maven.google.com' }
        maven { url "https://www.jitpack.io" }
    }
    dependencies {
        classpath("com.android.tools.build:gradle")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${project.ext.kotlinVersion}")
        classpath("com.google.gms:google-services:4.4.2")
    }
}

allprojects {
    repositories {
        google()
        mavenCentral()
        mavenLocal()

        maven { url 'https://developer.huawei.com/repo/' }

        maven { url "${project(':react-native-background-geolocation').projectDir}/libs" }

        maven { url("${project(':react-native-background-fetch').projectDir}/libs") }
    }
}

apply plugin: "com.facebook.react.rootproject"
christocracy commented 1 month ago

Plugin version: "4.17.3-rc.1"

Re-install with version 4.17.2

stalteri commented 1 month ago

Re-install with version 4.17.2

same issue with 4.17.2

also have this warns after gradle sync in android studio:

image
christocracy commented 1 month ago

attempt to reproduce in a freshly-generated RN "HelloWorld" app.

stalteri commented 1 month ago

attempt to reproduce in a freshly-generated RN "HelloWorld" app.

I understand that most likely the package will work on a fresh project, but I need it to work on my project (which, by the way, was started not so long ago and has the penultimate version of react native). I tried to configure it to see if it would meet my needs and if I should buy a license.

christocracy commented 1 month ago

It will take you 5 mins to test in a HelloWorld

stalteri commented 4 weeks ago

fixed by moving maven urls to settings.gradle file dependencyResolutionManagement section:

dependencyResolutionManagement {
  repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
  repositories {
    .
    .
    .
    // 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") }
    .
    .
    .
  }
}