sam mohcin sam mohcin - 3 months ago 75
Java Question

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

I bought a source code and Im getting this error:

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


Top-level build file where you can add configuration options common to all 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()
}
}


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

Answer

That version (0.6.0) is no longer published.

Use the latest stable version:

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

Also, since you are using the support libraries v24 you have to use api 24 to compile.

compileSdkVersion 24