android - gradle 构建失败错误 : Failed to resolve: com. android.support :cardview-v7:24. 0.1 和)无法解析 : com. android.support :appcompat-v7:24. 0.1

标签 android android-gradle-plugin android-support-library

无法解析:com.android.support:cardview-v7:24.0.1 和)无法解析:com.android.support:appcompat-v7:24.0.1

这是gradle配置 我需要做什么来解决这个问题 请帮助我

apply plugin: 'com.android.application'

    compileSdkVersion 24
    buildToolsVersion '24.0.1'
    defaultConfig {
        applicationId 'com.fanbaseafrica.fabaservices'
        minSdkVersion 14
        targetSdkVersion 24
        versionCode 2
        versionName '2.0'
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            debuggable false

            signingConfig signingConfigs.config

            renderscriptOptimLevel 3
        }
        debug {
            debuggable true
        }
    }
    productFlavors {
    }
}
repositories {
    jcenter()

}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:cardview-v7:24.0.1'
    compile 'com.android.support:appcompat-v7:24.0.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:design:24.0.1'
    compile 'de.hdodenhof:circleimageview:2.1.0'
    compile 'com.google.code.gson:gson:2.2.3'
    compile 'com.jakewharton.retrofit:retrofit1-okhttp3-client:1.1.0'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.android.support:recyclerview-v4:24.0.1'
    compile 'com.android.support:support-v7:24.0.1'
    compile 'com.koushikdutta.ion:ion:2.1.6'
    compile 'com.sprylab.android.texturevideoview:texturevideoview:1.1.1'
}

最佳答案

发生这种情况是因为 24.0.1 的支持库不存在。

使用有效版本更改所有支持库依赖项:

24.0.0
24.1.0
24.1.1
24.2.0

这里所有history .

还有一些依赖项是错误的:

更改:

compile 'com.android.support:recyclerview-v4:24.0.1'

compile 'com.android.support:recyclerview-v7:24.X.X'

'com.android.support:support-v7:24.X.X' 不存在。

使用

编译“com.android.support:support-v4:24.x.x”

关于android - gradle 构建失败错误 : Failed to resolve: com. android.support :cardview-v7:24. 0.1 和)无法解析 : com. android.support :appcompat-v7:24. 0.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39247294/

相关文章:

android - 无法将 android.support.v7 添加到我的项目构建路径

Android - 从立体声 .mp3 中提取一个 channel ,通过 AudioStream 的两个 channel 应用它

android - getInputStream 抛出异常

java - 无法获取 com.android.build.gradle.internal.api.DefaultAndroidSourceSet 类型的源集 main 的未知属性 'output'

android-studio - Gradle 2.0.0-beta4 使 AndroidAnnotation 不起作用

android - 找不到参数的方法 has()

android - IllegalStateException: fragment <ThisFragment> 当前不在 FragmentManager 中

android - Android启动Genymotion,但未在设备中启动

android - 将地理编码器限制为国家/地区

android - fragment 必须是公共(public)静态类才能从实例状态正确地重新创建