【问题标题】:Error:(54, 13) Failed to resolve: com.afollestad:material-dialogs:0.6.0错误:(54, 13) 无法解决:com.afollestad:material-dialogs:0.6.0
【发布时间】:2016-09-08 12:46:09
【问题描述】:

我买了一个源代码,我得到这个错误:

错误:(54, 13) 无法解决: com.afollestad:material-dialogs: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'
}

【问题讨论】:

  • 您的问题不清楚。尝试放一些代码和错误日志
  • 欢迎来到 StackOverflow。请访问帮助中心了解how to ask questions effectively。您的问题目前包含的信息太少,无法为您提供任何有意义的答案。既然您说您购买了此源代码,请询问您购买它的人或公司如何使用它。
  • 我用代码编辑了主题
  • 您可能想删除此行...compile 'com.google.android.gms:play-services:9.4.0' 您可能不需要所有 google play 服务,因为您在底部包含了您想要的服务(GCM、广告、身份验证)

标签: java android gradle android-gradle-plugin


【解决方案1】:

该版本 (0.6.0) 不再发布。

使用最新的稳定版本:

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

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

compileSdkVersion 24

【讨论】:

    【解决方案2】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2023-03-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-10
      • 2016-07-16
      • 2016-02-01
      • 1970-01-01
      相关资源
      最近更新 更多