Scenario: - minSdkVersion < 21, using vectorDrawables.generatedDensities to generate PNGs for API < 21, all drawables are vectors in source.
Expected Behavior: If I have drawable/x.xml and drawable-v28/x.xml, the latter is used on API 28+.
Actual Behavior: drawable-v28/x.xml is never used.
Reason: When Gradle generates the PNGs, it generates folders for each DPI, and then a drawable-anydpi-v21 folder. The drawable from drawable-v28/x.xml does not get used (I can't even find it in the build folder), since drawable-anydpi-v21 takes precedence due to specifying a DPI qualifier. AGP should create a drawable-anydpi-v28 folder for me for anything that's in source in drawable-v28.
I'll attach a repro app shortly. The expected behavior is that the app shows a red android on API < 28, and a black Android on API >= 28. Instead it shows a red android on all APIs.There is no asset in the build folder of the black Android at all.
This is a re-opening of https://issuetracker.google.com/111487502 which was incorrectly closed as never having gotten the repro project, when it was indeed uploaded almost a year ago.
Description
Scenario:
- minSdkVersion < 21, using vectorDrawables.generatedDensities to generate PNGs for API < 21, all drawables are vectors in source.
Expected Behavior:
If I have drawable/x.xml and drawable-v28/x.xml, the latter is used on API 28+.
Actual Behavior:
drawable-v28/x.xml is never used.
Reason:
When Gradle generates the PNGs, it generates folders for each DPI, and then a drawable-anydpi-v21 folder. The drawable from drawable-v28/x.xml does not get used (I can't even find it in the build folder), since drawable-anydpi-v21 takes precedence due to specifying a DPI qualifier. AGP should create a drawable-anydpi-v28 folder for me for anything that's in source in drawable-v28.
I'll attach a repro app shortly. The expected behavior is that the app shows a red android on API < 28, and a black Android on API >= 28. Instead it shows a red android on all APIs.There is no asset in the build folder of the black Android at all.
A repro project exists at
This is a re-opening of