skip to Main Content

I’m encountering an issue with my Android project after migrating to a new system. The project was working fine in the previous version of Android Studio, but now I’m getting the following error when trying to build:

Failed to resolve: com.ismaeldivita.chipnavigation:chip-navigation-bar:1.3.3

This issue occurs with every JitPack.io dependency. After searching a lot, I found that adding the following line to the repositories section usually solves the problem for most users:

maven { url 'https://jitpack.io' }

However, in my case, I’m still getting the same error. I’m not sure what I’m doing wrong.
also in some post suggesting add maven { url = uri("https://www.jitpack.io" ) } insted of old this also not work.

Here is my settings.gradle file:

pluginManagement {
    repositories {
        gradlePluginPortal()
        google()
        jcenter()
        mavenCentral()
       maven { url 'https://jitpack.io' }

    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        jcenter()

        maven { url 'https://jitpack.io' }


    }
}
rootProject.name = "Sabir Khansaheb & Sons"
include ':app'

Here is my build.gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id 'com.android.application' version '8.6.0' apply false
    id 'com.android.library' version '8.6.0' apply false
}

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

Here is my buid.gradle(app):

plugins {
    id 'com.android.application'
}

android {
    buildFeatures {
        buildConfig = true
    }
    compileSdk 34

    defaultConfig {
        applicationId "com.sabirkhansahebsons"
        minSdk 26
        targetSdk 34
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    namespace 'com.sabirkhansahebsons'
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.7.0'
    implementation 'com.google.android.material:material:1.12.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.2.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.6.1'
    implementation 'com.ismaeldivita.chipnavigation:chip-navigation-bar:1.3.3'
    implementation 'com.facebook.shimmer:shimmer:0.5.0'

}

2

Answers


  1. com.ismaeldivita.chipnavigation:chip-navigation-bar:1.3.3 is from four years ago, and it was hosted on the now-discontinued JCenter, not jitpack.io.

    The current documentation for that library shows that you should use:

    implementation 'com.github.ismaeldivita:chip-navigation-bar:1.4.0'
    
    Login or Signup to reply.
  2. I found the answer elsewhere and finally solved it by adding a new Maven repository.

    Original address:
    JCenter deprecation; impact on Gradle and Android

    New Maven:

    maven { url = uri("https://maven.scijava.org/content/repositories/public/") }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search