【发布时间】:2016-09-10 18:17:31
【问题描述】:
我导入了一个新应用,但我从 Gradle (Android Studio) 收到以下错误:
Failed to resolve: com.afollestad:material-dialogs:0.6.0
这是我的 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.
compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:support-v4:21.0.3'
compile 'com.google.android.gms:play-services:6.5.87'
// Important library to create material design. do not remove this.
compile project(':materialDesign')
// Library to create tabbar
compile 'com.jpardogo.materialtabstrip:library:1.0.6'
// Library to create ripple effect. work together with materialDesign library.
compile 'com.github.traex.rippleeffect:library:1.2.2'
// Library to create rounded, circle, and any shape image.
compile 'com.makeramen:roundedimageview:1.4.0'
// Library load lazy images.
compile 'com.squareup.picasso:picasso:2.4.0'
// Library to create simple list.
compile 'com.android.support:recyclerview-v7:21.0.0'
// Library to create complex clickable list.
compile 'com.android.support:cardview-v7:21.0.3'
// Library to create material dialog.
compile 'com.afollestad:material-dialogs:0.6.0'
// Library to create animation imageview.
compile 'com.flaviofaria:kenburnsview:1.0.5'
}
我该如何解决这个问题?
【问题讨论】:
-
尝试编译'com.afollestad.material-dialogs:core:0.9.0.1'
-
当我这样做时,我得到一堆错误uploadpie.com/NWAgY
-
将您的构建工具更新到至少 23.0.0。目前它在你的 gradle 中是 21.1.2。
-
同样的问题,我认为我们在这里遗漏了一些东西uploadpie.com/ElddT
-
您错过了字符串“core”。它是 'com.afollestad.material-dialogs:core:0.9.0.1' 而不是 'com.afollestad.material-dialogs:0.9.0.1'
标签: java android maven android-studio gradle