-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bundletool doesn't fetch the atrributes in styles.xml if there are more than one dpi. #128
Comments
Do you have a small project or AAB that reproduces the issue and that you could share with us so we can get a closer look? |
It is very easy to verify. I just newed a HelloWorld project, and add a style named "title_text_style" in both styles under both folder values and values-ldpi as mentioned before. Remove the layout_width and layout_height attribute of the TextView in the HellowWorld and use the style=@style/title_text_style instead. build the abb, and install it with bundletool. The app will crash. |
Hi, plecesne, is there any more information I could offer to help you look into this issue? |
We have all the information we need, sorry for the delay, we will be looking into it as soon as possible. |
Thanks to your project, I was able to reproduce, we're looking into the best way to fix the issue. |
Fixed in 0.14.0. |
Describe the bug
I have an layout xml, which uses a textview, like this:
The style in the styles.xml is like this:
however, I have 2 styles.xml in styles folder and styles-ldpi folder, the other style in ldpi is as follow:
After using bundletool to install, the app always crash on the phone under Android 9. (Android 9 is ok) From the log it shows that I miss the layout_width in the layout xml file. If I remove the title_text_style style in the styles-ldpi, the app will launch without an error.
Bundletool version(s) affected
Version: [bundletool-all-0.11.0.]
Stacktrace
java.lang.RuntimeException: Binary XML file line #28: You must supply a layout_width attribute.
To Reproduce
in my case, use style to describe the layout_width in both styles folder and styles-ldpi folder, it will crash in all phones under Android 9
Expected behavior
No crashing.
Environment:
Android 8.0 and pre
The text was updated successfully, but these errors were encountered: