You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
We recently ran into an issue where our LDPI and MDPI split apks, woud have a drawable resourceId with no entries like so
id
name
ldpi
mdpi
hdpi
0x7f08014b
camera_flip_icon
The root cause was that an attribute (which has no defined density) was prioritized over a drawable with density. Specifically, the first resource defined in the tableEntry below was chosen:
The reason this strange resource exists within our tableEntry for camera_flip_icon is because one of our modules referenced a drawable within another module without depending on that module. This would work since the correct entry would be defined in resources table when the apk is assembled. Specifically, we had the following code:
Stacktrace
Copy all of the output of the command, including the stacktrace if visible.
To Reproduce
Create modules A,B,C where both B and C are dependencies of A. Create xxxhdpi drawable in module C and reference from within module B using manually defined item. LDPI split should have no entries for the given drawable.
A
/ \
B C
Expected behavior
I would expect either of the following behaviors:
Crash when this situation occurs
Always prefer config value with a specified density over one with non-density (this would be more consistent behavior with assemble task)
The text was updated successfully, but these errors were encountered:
Although what bundletool is doing is technically correct since the default density is the same as the mdpi density so specifying both resources can lead to indeterminism, it seems that a few developers are getting confused by this, so we should address this.
Describe the bug
We recently ran into an issue where our LDPI and MDPI split apks, woud have a drawable resourceId with no entries like so
The root cause was that an attribute (which has no defined density) was prioritized over a drawable with density. Specifically, the first resource defined in the tableEntry below was chosen:
The reason this strange resource exists within our tableEntry for
camera_flip_icon
is because one of our modules referenced a drawable within another module without depending on that module. This would work since the correct entry would be defined in resources table when the apk is assembled. Specifically, we had the following code:Bundletool version(s) affected
Version: 0.9.0
Stacktrace
Copy all of the output of the command, including the stacktrace if visible.
To Reproduce
Create modules A,B,C where both B and C are dependencies of A. Create
xxxhdpi
drawable in module C and reference from within module B using manually defined item.LDPI
split should have no entries for the given drawable.Expected behavior
I would expect either of the following behaviors:
The text was updated successfully, but these errors were encountered: