To use VectorDrawableCompat, you need to set android.defaultConfig.vectorDrawables.useSupportLibrary

错误信息:

To use VectorDrawableCompat, you need to set android.defaultConfig.vectorDrawables.useSupportLibrary = true.

如下图所示:

To use VectorDrawableCompat, you need to set android.defaultConfig.vectorDrawables.useSupportLibrary_第1张图片

解决办法:

在project\app\build.gradle文件android.defaultConfig中添加vectorDrawables.useSupportLibrary = true,

如下所示:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.xadhsd.faceui"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
    }
......

 

你可能感兴趣的:(Android)