ShowcaseView无法解决

时间:2015-06-12 08:39:46

标签: android showcaseview

我尝试使用来自https://github.com/amlcurran/ShowcaseView

的ShowcaseView

所以我将这一行添加到gradle.build:

V2.0

但我收到了这个错误:

  

错误:(26,13)无法解决:com.github.amlcurran.showcaseview:library:5.0.0

有谁知道如何解决这个问题?

Gradle文件:

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


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'
}

1 个答案:

答案 0 :(得分:1)

你应该添加:

repositories {
    mavenCentral()
}

到你的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'
}