Search code examples
androidgithubandroid-gradle-plugindependencies

Facing issues in adding GitHub libraries and dependencies


I am not able to add many github libraries to my project. For example at now I want to add io.alterac.blurkit:blurkit:1.1.0 but it keeps on saying Failed to resolve: io.alterac.blurkit:blurkit:1.1.0. I have checked my gradle offline button it's online

This is my build.gradle

buildscript {
    dependencies {
        classpath 'com.google.gms:google-services:4.4.0'
    }
    repositories {
        google()
        mavenCentral()
        maven { url 'https://jitpack.io' }
        jcenter()

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

plugins {
    id 'com.android.application' version '7.4.2' apply false
    id 'com.android.library' version '7.4.2' apply false
}

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

This is my settings.gradle

pluginManagement {
    repositories {
        google()
        mavenCentral()
        gradlePluginPortal()
    }
}
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 = "Radiant"
include ':app'

I have tried every possible way I know but it's not working

I have tried adding maven { url 'https://jitpack.io' } in my settings.gradle and build.gradle but it didn't worked


Solution

  • The library is published on Jcenter and seems like Jcenter is down. I checked from here: https://mvnrepository.com/artifact/io.alterac.blurkit/blurkit/1.1.1

    I recently got this error and to fix it, just download the source code and import its module "blurkit" https://github.com/CameraKit/blurkit-android

    And please reconfigure the build.gradle of the module and delelte deploy.gradle. Everything works fine for me.