Reputation: 459
I have project which was working fine till yesterday but this morning when i try to build it keeps throwing failed to resolved support-vector-Drawable error. I try to clean and this error shows up
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
and here is my gradle
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'
}
and here is my level build.gradle file
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
}
Upvotes: 0
Views: 4333
Reputation: 17131
defaultConfig {
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
}
Change to
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
Upvotes: 0
Reputation: 459
so after half day searching and rebuild finally it fixed by upgrading my compileSdkVersion and all other library to 27 ... I hope this help any one who has this problem
Upvotes: 1
Reputation: 4705
Hi as per my understanding please try bellow tow thing one
One is replacing your app compact version dependancy with specific version else of plus
compile 'com.android.support:appcompat-v7:26+'
Replace with (Please set as per your build tool)
compile 'com.android.support:appcompat-v7:26.1.0'
And Another thing try updating your build tool version.
Upvotes: 1