Using Vector Drawable Compat

后端 未结 5 389
我寻月下人不归
我寻月下人不归 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:13

    In your module build.gradle file, you need to add this line:

    apply plugin: 'com.android.application'
    
    android {
        ...
    
        defaultConfig {
            ...
    
            vectorDrawables.useSupportLibrary = true // This line here
        }
        ...
    }
    
    ...
    

提交回复
热议问题