ShowcaseView failed to resolve

681 views Asked by At

I'm trying to use the ShowcaseView from : https://github.com/amlcurran/ShowcaseView

So I added this line to the gradle.build:

compile com.github.amlcurran.showcaseview:library:5.0.0

But I got this error:

Error:(26, 13) Failed to resolve: com.github.amlcurran.showcaseview:library:5.0.0

anyone knows how to fix this?

Gradle files:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.example.test.squares"
        minSdkVersion 15
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.1.1'
    compile 'com.github.blackfizz:eazegraph:1.2.2@aar'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.github.amlcurran.showcaseview:library:5.0.0'
    compile 'com.github.lecho:hellocharts-library:1.5.5@aar'
}


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

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

allprojects {
    repositories {
        jcenter()
    }
}
1

There are 1 answers

0
Ziem On BEST ANSWER

You should add:

repositories {
    mavenCentral()
}

to your app/build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.example.test.squares"
        minSdkVersion 15
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    mavenCentral()
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.1.1'
    compile 'com.github.blackfizz:eazegraph:1.2.2@aar'
    compile 'com.nineoldandroids:library:2.4.0'
    compile 'com.github.amlcurran.showcaseview:library:5.0.0'
    compile 'com.github.lecho:hellocharts-library:1.5.5@aar'
}