jitpack.io - failure to resolve

Viewed 3101

I'm trying to import a library using jitpack.io. Here's my top-level build.gradle:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

and here's my app/build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.0"

    defaultConfig {
        applicationId "com.domain.app"
        minSdkVersion 19
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.0'
    compile files('libs/Parse-1.9.1/Parse-1.9.1.jar')
    compile files('libs/Parse-1.9.1/bolts-android-1.2.0.jar')
    compile 'com.github.deano2390:MaterialShowcaseView:1.0.6'

}

and I keep getting : Error:(27, 13) Failed to resolve: com.github.deano2390:MaterialShowcaseView:1.0.6 without any additional information.

I've also tried with a sffuix as advised by the library's auther:

compile 'com.github.deano2390:MaterialShowcaseView:1.0.6@aar'
6 Answers

I have a library project which depends on a library served from jitpack. In my case, adding the following to my library's build.gradle resolved the issue:

allprojects { p ->
    p.repositories {
        maven { url "https://jitpack.io" }
    }
}

Make sure add maven { url "https://jitpack.io" } as the first respository. I am using android studio 3.3 and have the same issue. for some reason libraries in jitpack are fetched from google and jcenter and cant locate it. re-order the repos fix this for me hope its helpful to someone

allprojects {
    repositories {
        maven { url "https://jitpack.io" }
        google()
        jcenter()

    }
}

enter image description here

Open settings.gradle file and add the below line inside repositories (as shown in above picture)

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

And remove below code from project's build.gradle file

allprojects {
repositories {
    jcenter()
    maven { url "https://jitpack.io" }
}}
Related