Android vector drawable app:srcCompat not showing images

前端 未结 8 734
误落风尘
误落风尘 2020-11-28 04:38

I\'m using support library to show vector images on android kitkat. When I test my app on emulater I don\'t see any of these images. I made a separate layout for android lol

8条回答
  •  天命终不由人
    2020-11-28 05:09

    Implement and app:srcCompact and then you can use it on the ImageView

    implementation 'com.android.support:appcompat-v7:28.0.0'

    Make sure you implement the right version.

    Then in your build.gradle set android.defaultConfig.vectorDrawables.useSupportLibrary = true

    defaultConfig {
    
        //...
    
        vectorDrawables {
            useSupportLibrary true
        }
    }
    

提交回复
热议问题