Error:(54, 13) Failed to resolve: com.afollestad:material-dialogs:0.6.0

Error:(54, 13) Failed to resolve: com.afollestad:material-dialogs:0.6.0

我购买了源代码,但出现此错误:

Error:(54, 13) Failed to resolve: com.afollestad:material-dialogs:0.6.0 href="openFile:C:/Users/abdelmohcen/Desktop/spatullr-recipes-app-for-android/app/build.gradle">Show in File
Show in Project Structure dialog

顶级构建文件,您可以在其中添加所有 sub-projects/modules.

通用的配置选项
buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.0.0'

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

allprojects {
    repositories {
        jcenter()
    }
}

这里是build.gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.2"

defaultConfig {
    applicationId "com.pongodev.recipesapp"
    minSdkVersion 11
    targetSdkVersion 21
    versionCode 5
    versionName "3.0.3"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])

// Main libraries, you always need this libraries in your project. do not remove them.

// Important library to create material design. do not remove this.
compile project(':materialDesign')

// Library to create tabbar

// Library to create ripple effect. work together with materialDesign library.

// Library to create rounded, circle, and any shape image.

// Library load lazy images.

// Library to create simple list.

// Library to create complex clickable list.

// Library to create material dialog.

// Library to create animation imageview.

compile 'com.android.support:appcompat-v7:24.2.0'
compile 'com.android.support:support-v4:24.2.0'
compile 'com.google.android.gms:play-services:9.4.0'
compile 'com.jpardogo.materialtabstrip:library:1.0.6'
compile 'com.github.traex.rippleeffect:library:1.2.2'
compile 'com.makeramen:roundedimageview:1.4.0'
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.android.support:recyclerview-v7:24.2.0'
compile 'com.android.support:cardview-v7:24.2.0'
compile 'com.afollestad:material-dialogs:0.6.0'
compile 'com.flaviofaria:kenburnsview:1.0.5'
compile 'com.google.android.gms:play-services-ads:9.4.0'
compile 'com.google.android.gms:play-services-auth:9.4.0'
compile 'com.google.android.gms:play-services-gcm:9.4.0'
}

该版本 (0.6.0) 不再发布。

使用最新的稳定版本:

dependencies {
    // ... other dependencies here
    compile 'com.afollestad.material-dialogs:core:0.9.0.1'
}

此外,由于您使用的是支持库 v24,因此您必须使用 api 24 来编译

compileSdkVersion 24

或者你可以用这个替换你的依赖:

compile('com.github.afollestad.material-dialogs:core:0.8.5.2@aar') {
transitive = true }