Using Vector Drawable Compat

后端 未结 5 393
我寻月下人不归
我寻月下人不归 2021-01-30 16:30

I am making an android app with a few fragments. In one of these fragments, I have a toolbar with a back arrow as an image button.
In the XML File, I have the \"app:srcCompa

5条回答
  •  时光取名叫无心
    2021-01-30 17:06

    You have to add vectorDrawables.useSupportLibrary = true this line of code in you app level build.gradle inside the defaultConfig tag

    defaultConfig {
            applicationId "your package Name"
            minSdkVersion 19
            targetSdkVersion 29
            versionCode 1
            versionName "0.0.1"
            //This is the Main Line you have to add to avoid this warning.
            vectorDrawables.useSupportLibrary = true
            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        }
    

提交回复
热议问题