Reputation: 19
I, m using Android Studio 3.3, and in my project I hava a problem with com.afollestad.material-dialogs:core:2.0.0, when I add com.afollestad.material-dialogs to my Gradle, error was show: Failed to resolve: com.afollestad.material-dialogs:core:2.0.0,
Here is my Gradle: Project
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
My Gradle: app
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.pongodev.recipesapp"
minSdkVersion 20
targetSdkVersion 28
versionCode 5
versionName "3.0.3"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
// Main libraries, you always need this libraries in your project. do not remove them.
implementation'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.android.gms:play-services:12.0.1'
// Important library to create material design. do not remove this.
implementation project(':materialDesign')
// Library to create tabbar
implementation 'com.jpardogo.materialtabstrip:library:1.0.6'
// Library to create ripple effect. work together with materialDesign library.
implementation 'com.github.traex.rippleeffect:library:1.3'
// Library to create rounded, circle, and any shape image.
implementation 'com.makeramen:roundedimageview:1.4.0'
// Library load lazy images.
implementation 'com.squareup.picasso:picasso:2.71828'
// Library to create simple list.
implementation 'com.android.support:recyclerview-v7:28.0.0'
// Library to create complex clickable list.
implementation 'com.android.support:cardview-v7:28.0.0'
// Library to create material dialog.
implementation 'com.afollestad:material-dialogs:2.0.0'
// Library to create animation imageview.
implementation 'com.flaviofaria:kenburnsview:1.0.5'
}
My Gradle: materialDesign
apply plugin: 'com.android.library'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 20
targetSdkVersion 28
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
implementation 'com.android.support:support-v4:28.0.0'
implementation files('libs/nineoldandroids-2.4.0.jar')
}
Upvotes: 1
Views: 1793
Reputation: 308
Change implementation 'com.afollestad.material-dialogs:2.0.0'
to implementation 'com.afollestad.material-dialogs:core:2.0.0'
in your app module's gradle file.
EDIT:
Make sure you already have maven { url 'https://jitpack.io' }
this line in Project level build.gralde file. If it is not present then add this line like
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
Upvotes: 1