android - 无法解析support-vector-Drawable

标签 android gradle android-support-library

我有一个直到昨天都可以正常工作的项目,但是今天早晨,当我尝试构建它时,该项目一直无法解决support-vector-Drawable错误。
我尝试清洁并且出现此错误

Error:Could not resolve all files for configuration ':app:debugCompileClasspath'. Could not find support-vector-drawable.aar (com.android.support:support-vector-drawable:26.0.2). Searched in the following locations: https://jcenter.bintray.com/com/android/support/support-vector-drawable/26.0.2/support-vector-drawable-26.0.2.aar



这是我的礼物
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
    applicationId "com.arizeh.arizehplus"
    minSdkVersion 17
    targetSdkVersion 22
    multiDexEnabled true
    versionCode 29
    versionName "3.0.5"
    useLibrary 'org.apache.http.legacy'
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    defaultConfig {
        vectorDrawables.useSupportLibrary = true
    }
}

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

dependencies {

compile 'com.android.support:appcompat-v7:26+'
testCompile 'junit:junit:4.12'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
}

这是我的关卡build.gradle文件
buildscript {
repositories {
    google()
    jcenter()
    maven { url 'https://maven.fabric.io/public' }
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.0.1'
    classpath 'com.google.gms:google-services:3.2.1'
    classpath 'io.fabric.tools:gradle:1.24.4'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files

}

}
allprojects {
    repositories {
        google()
        jcenter()
        maven { url 'http://jhoobin.abroid.com/repo/' }
        maven { url "https://jitpack.io" }
        maven {
            url "https://maven.google.com"
        }
    }

}

task clean(type: Delete) {
    delete rootProject.buildDir
}

最佳答案

嗨,根据我的理解,请尝试下面的拖曳东西

一种是用其他特定版本的替代您的应用程序压缩版本相关性

compile 'com.android.support:appcompat-v7:26+'

替换为(请根据您的构建工具进行设置)
compile 'com.android.support:appcompat-v7:26.1.0'

还有另一件事,尝试更新您的构建工具版本。

关于android - 无法解析support-vector-Drawable,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51435606/

相关文章:

gradle - JaCoCo 具有微服务项目架构?

android - 如何使用 XML 而不是 Java 更改所选微调器项目的颜色?

android - 我如何在 Android DrawerLayout 上请求 DisallowTouchEvents

spring-boot - Gradle 5 JUnit BOM 和 Spring Boot 版本不正确

android - 如何使用 Gradle resolutionStrategy 强制依赖版本?

android - 在 Android Studio 中加载一个简单的文本文件

安卓 View 问题

android - Apk 上传失败

android - 是否可以为应用内订阅提供折扣?

Spring boot多个gradle项目依赖管理->无法更改配置的依赖关系