我买了一个源代码,我收到了这个错误:
错误:(54,13)无法解决: com.afollestad:材料的对话框:0.6.0 HREF ="中openFile:C:/Users/abdelmohcen/Desktop/spatullr-recipes-app-for-android/app/build.gradle">显示 在文件中显示 项目结构对话框
顶级构建文件,您可以在其中添加所有子项目/模块通用的配置选项。
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 :(得分:1)
该版本(0.6.0)不再发布。
使用最新的稳定版本:
dependencies {
// ... other dependencies here
compile 'com.afollestad.material-dialogs:core:0.9.0.1'
}
此外,由于您使用的是支持库v24,因此必须使用 api 24进行编译。
compileSdkVersion 24
答案 1 :(得分:0)
或者你可以用这个替换你的依赖:
compile('com.github.afollestad.material-dialogs:core:0.8.5.2@aar') {
transitive = true }