错误:无法解决:support-vector-drawable [英] Error:Failed to resolve: support-vector-drawable

查看:169
本文介绍了错误:无法解决:support-vector-drawable的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的gradle有问题.一切正常,但是在重建项目时突然出现了这个错误:

I have a problem with gradle. it was working fine but all of sudden when I was rebuilding the project it gives me this error:

错误:无法解决:support-vector-drawable

Error:Failed to resolve: support-vector-drawable

我找不到我的问题是什么

I can't find out what my problem is?

我的app.gradle

buildscript {
    repositories {
        maven { url 'https://plugins.gradle.org/m2/' }
    }
    dependencies {
        classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.8.1'
    }
}

apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

repositories {
    maven { url 'https://maven.google.com' }
}

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

android {
    compileSdkVersion 26
    buildToolsVersion '26.0.2'
    defaultConfig {
    applicationId "com.arizeh.arizeh"
    minSdkVersion 17
    targetSdkVersion 22
    multiDexEnabled true
    versionCode 29
    versionName "3.0.5"
    useLibrary 'org.apache.http.legacy'
    testInstrumentationRunner 
    buildTypes {
        release {
           minifyEnabled false
           proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility 1.8
        targetCompatibility 1.8
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26+'
    testCompile 'junit:junit:4.12'
    compile 'com.google.android.gms:play-services-maps:15.0.1'
    compile 'com.google.android.gms:play-services-places:15.0.1'
    compile 'com.google.android.gms:play-services-location:15.0.1'
    compile 'com.google.android.gms:play-services-gcm:15.0.1'
    compile 'com.google.android.gms:play-services-base:15.0.1'
    compile 'com.google.firebase:firebase-messaging:15.0.2'

    compile 'com.android.support:design:26.1.0'
    compile 'com.android.support:cardview-v7:26.1.0'
    compile 'uk.co.chrisjenx:calligraphy:2.1.0'
    compile 'com.google.code.gson:gson:2.8.0'
    compile 'com.koushikdutta.ion:ion:2.+'
    compile 'com.android.support:percent:26.1.0'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.shawnlin:number-picker:2.4.2'
    compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
    compile 'com.android.support:multidex:1.0.2'
    compile 'com.android.support:support-compat:26.1.0'
    compile 'com.daimajia.easing:library:2.0@aar'
    compile 'com.daimajia.androidanimations:library:2.2@aar'

    compile 'com.zarinpal:purchase:0.0.3-beta'

    compile 'com.squareup.retrofit2:retrofit:2.3.0'
    compile 'com.squareup.retrofit2:converter-gson:2.3.0'
} 

推荐答案

在defaultConfig中添加vectorDrawables.useSupportLibrary = true

Add vectorDrawables.useSupportLibrary = true in defaultConfig

defaultConfig {
    vectorDrawables.useSupportLibrary = true
}

如果错误仍然存​​在,则

If an error still persists then

allprojects {
 repositories {
    google() // make it first element
    jcenter()
    maven { url 'https://maven.google.com' }
    }
  }

这篇关于错误:无法解决:support-vector-drawable的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆