Failed to resolve: be.tarsos.dsp:core:2.5 / be.tarsos.dsp:jvm:2.5

283 Views Asked by At

I am trying to create a Native Module (Android) for my React Native project. In order to do so I wanted to add a new dependency, namely TarsosDSP.

Following the docs I added this to my /android/build.gradle

repositories {
    google()
    maven {                                           //
        url = uri("https://mvn.0110.be/releases")     //  Added lines
    }                                                 //
    mavenCentral()
}

as well as this to my /android/app/build.gradle

dependencies {
    ...
    implementation 'be.tarsos.dsp:core:2.5'     // Added lines
    implementation 'be.tarsos.dsp:jvm:2.5'      //
}

Building the project it doesn't seem like fetching the lib, giving:

enter image description here

What I tried:

  • Building the project with cleared cache
  • Deleting all dependencies manually (.gradle file)
  • Restarting PC / Android Studio
1

There are 1 best solutions below

0
On

I was running into the same issue and I solved it by adding the specified maven repository to my settings.gradle file under dependencyResolutionManagement rather than as its own section in build.gradle.

Gradle Scripts/settings.gradle.kts

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) 
    repositories {
        google()
        mavenCentral()
        maven {
            name = "TarsosDSP repository"
            url = uri("https://mvn.0110.be/releases")
        }
    }
}

After doing this I selected File->Sync Project With Gradle Files and then Build->Make Project