Search code examples
androidandroid-manifestandroid-drawableandroid-productflavors

Android flavor uses different drawables for mobile and tablet


I have an app that has multiple flavors. Each flavor contains Manifest with:

android:icon="@drawable/ic_launcher_2"

inside application tag. Each flavor has it's own ic_launcher_2 drawable with mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi sizes and all flavors works fine except one. XML of few screens has:

android:src="@drawable/log_login_screen" 

inside ImageView tag and each flavor has it's own log_login_screen drawable in all sizes.

If i run the app on mobile, everything works fine, launcher is the one that should be and also all the logos inside the app, but if I run it on tablet, it uses different ones. That's the case for only one flavor, all the other ones are ok... Maybe the issue is with drawable sizes?


Solution

  • It sounds like you have issue with one/few drawables in the specific flavour. try to recrate them or replace them with drawables from another flavour just to make sure that this is the issue