I am using Android Studio 1.5.1, Gradle 2.8 and my project is min sdk vserion: 14, target sdk version: 23.
So, when I add vectorDrawables to the configuration according to Google documentation: Added VectorDrawable support library , I get the following error:
Error:(13, 0) Could not find property 'vectorDrawables' on ProductFlavor_Decorated{name=main, dimension=null, minSdkVersion=ApiVersionImpl{mApiLevel=14, mCodename='null'}, targetSdkVersion=ApiVersionImpl{mApiLevel=23, mCodename='null'}, renderscriptTargetApi=null, renderscriptSupportModeEnabled=null, renderscriptNdkModeEnabled=null, versionCode=25, versionName=1.0.25, applicationId=com.smsoft.alibaba, testApplicationId=null, testInstrumentationRunner=null, testInstrumentationRunnerArguments={}, testHandleProfiling=null, testFunctionalTest=null, signingConfig=null, resConfig=null, mBuildConfigFields={}, mResValues={}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}}.
this is my build.gradle file:
apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.smsoft.alibaba" minSdkVersion 14 targetSdkVersion 23 versionCode 25 versionName "1.0.25" vectorDrawables.useSupportLibrary = true } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.2.0' compile 'com.android.support:design:23.2.0' compile 'com.android.support:support-v4:23.2.0' compile 'com.android.support:cardview-v7:23.2.0' }
Does anyone know how to fix this problem?
EDIT
Thanks @Gabriele Mariotti for being embarrassed between Gradle and Gradle plugins. I am confused reading the addition of Compact Vector Drawables instructions.