【问题标题】:ShowcaseView failed to resolveShowcaseView 无法解决
【发布时间】:2015-06-12 08:39:45
【问题描述】:

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

所以我在 gradle.build 中添加了这一行:

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

但是我收到了这个错误:

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

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

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

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()
    }
}

【问题讨论】:

  • 请将您的 gradle 文件添加到您的问题中。

标签: android showcaseview


【解决方案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'
}

【讨论】:

    猜你喜欢
    • 2018-06-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-11
    • 1970-01-01
    • 2016-03-30
    • 2018-04-21
    • 2019-06-24
    相关资源
    最近更新 更多