当前位置: 首页 > 知识库问答 >
问题:

解析失败:com.afollestad.Material-Dialogs:core:0.8.5.2

姚兴安
2023-03-14

我正在使用Android Studio 2.1.2,在我的项目中,com.afollestad.Material-Dialogs:core:0.8.5.2遇到了一个问题,当我将com.afollestad.Material-Dialogs添加到我的Gradle中时,会出现错误:未能解决:com.afollestad.Material-Dialogs:core:0.8.5.2,

这是我的年级:

buildscript {
 repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.1.2'
    classpath 'com.google.gms:google-services:3.0.0'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
allprojects {
repositories {
    jcenter()
    mavenLocal()
    mavenCentral()
    maven { url "https://jitpack.io" }
}

这是我的gradle:app

apply plugin: 'com.android.application'

android {
 configurations.all {
   resolutionStrategy.force 'com.android.support:support-annotations:25.3.1'
}
compileSdkVersion 25
buildToolsVersion "24.0.2"

defaultConfig {
    applicationId "com.panaceasoft.mokets"
    minSdkVersion 14
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/android-async-http-1.4.4.jar')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:palette-v7:25.3.1'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.mcxiaoke.volley:library:1.0.+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.pnikosis:materialish-progress:1.5'
compile 'com.google.android.gms:play-services-ads:9.4.0'
compile 'com.google.android.gms:play-services-maps:9.4.0'
compile 'com.google.android.gms:play-services-gcm:9.4.0'
compile 'com.github.rey5137:material:1.2.2'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.stripe:stripe-android:2.0.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.google.firebase:firebase-core:9.4.0'
compile 'com.google.firebase:firebase-messaging:9.4.0'
compile 'com.google.firebase:firebase-crash:9.4.0'
compile 'me.zhanghai.android.materialprogressbar:library:1.1.4'

compile('com.afollestad.material-dialogs:core:0.8.5.2@aar') {
    transitive = true
}
androidTestCompile 'com.android.support:support-annotations:25.1.3'}

apply plugin: 'com.google.gms.google-services'

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

共有1个答案

漆雕彬彬
2023-03-14

您应该使用最新版本而不是AAR。

compile 'com.afollestad.material-dialogs:core:0.9.6.0'

您应该升级您的版本

classpath 'com.google.gms:google-services:3.2.0'
classpath 'com.android.tools.build:gradle:3.1.2'

然后

compileSdkVersion 27
buildToolsVersion "27.0.3"

然后

compile 'com.android.support:appcompat-v7:27.1.1'

最后

repositories {
        jcenter()
       // google()
        maven {
            url "https://maven.google.com"
        }
    }
 类似资料: