Home > Net >  Cannot resolve jitpack dependencies in android studio in the last gradle version
Cannot resolve jitpack dependencies in android studio in the last gradle version

Time:09-29

I get Failed to resolve: com.github.dogecoin:libdohj:v0.15.9 error and I don't know why. I also tried other jitpack dependencies. It works fine in my previous projects.

buildscript {
    ext {
        compose_version = '1.0.2'
    }
    repositories {
        google()
        maven { url "https://jitpack.io" }
        mavenCentral()

    }

    dependencies {
        classpath "com.android.tools.build:gradle:7.0.2"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
        classpath "com.google.dagger:hilt-android-gradle-plugin:2.38.1"
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

CodePudding user response:

I added the maven { url "https://jitpack.io" } to the settings.gradle and it fixed the issue.

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        jcenter() // Warning: this repository is going to shut down soon
        maven { url "https://jitpack.io" }

    }
}
rootProject.name = "Crypto World"
include ':app'
  • Related