https://kotlinlang.org logo
#compose
Title
# compose
t

Timo Drick

07/22/2020, 10:56 AM
Some of my vector drawables get converted to png images during apk compilation. (I assume that is because they contain features only supported in api >= 24) That is fine but when i use vectorResource(id=...) than it works only in api levels >= 24 and in api levels < 24 i have to use imageResource(id=...) What is the recommended way of doing this things?
Just to be clear. Other vector drawable icons working in api < 24. Just a few get converted to pngs
c

cb

07/22/2020, 11:08 AM
Do you have the vector -> PNG generation turned off?
Copy code
android {
    defaultConfig{
        vectorDrawables.useSupportLibrary = true
    }
}
👍 1
t

Timo Drick

07/22/2020, 11:22 AM
@cb yes that solved it. Thank you very much :-D
👍 1
c

cb

07/22/2020, 4:33 PM
Great. Just raised a bug to fix the template: https://issuetracker.google.com/161896283