You can add the following line inside your default config of your app build.gradle:
defaultConfig{
vectorDrawables.useSupportLibrary = true
}
Edit: you also need to add this dependency if you didn’t already
dependencies {
compile 'com.android.support:appcompat-v7:27.1.1'
}
Update:
Since Gradle 3.4 the compile
configuration is deprecated and should be replaced by implementation
:
dependencies {
implementation 'com.android.support:appcompat-v7:27.1.1'
}