7

I have an app with a base brand and multiple whitelabel brands along with multiple server targets. In my app's build.gradle,the flavors are defined as: flavorDimensions("server", "whitelabel")

In my src/main/res/drawable I have a logo.xml VectorDrawable for the base brand and it is overwritten in src/whitelabel1/res/drawable.

When my app's build.config contains vectorDrawables.useSupportLibrary = true the correct logo.xml is used in my ImageView. If I remove useSupportLibrary the ImageView renders logo.xml from main even in the apk for Whitelabel1

<ImageView
    android:id="@+id/imageLogo"
    android:layout_width="@dimen/viewXS"
    android:layout_height="wrap_content"
    android:layout_margin="@dimen/marginXS"
    android:adjustViewBounds="true"
    android:padding="@dimen/marginXS"
    app:layout_constraintLeft_toLeftOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    app:srcCompat="@drawable/ic_logo" />
cren90
  • 1,367
  • 2
  • 17
  • 30

1 Answers1

2

It happened with me as well. only after writing this vectorDrawables.useSupportLibrary = true inside defaultconfig. vector resources was picked from the flavor source set folder.

Irfan Ali
  • 21
  • 4