[Android] Failed to inflate ColorStateList - error fix for CheckBox#24658
Conversation
| <item name="android:minWidth">0dp</item> | ||
| <item name="android:minHeight">0dp</item> | ||
| <!-- remove the button tint as MAUI manages it --> | ||
| <item name="buttonTint">?attr/colorPrimary</item> |
There was a problem hiding this comment.
It can also be set to @null
There was a problem hiding this comment.
I think colorPrimary is defined in the templates only? What will happen if you were to remove it?
Maybe @null or anything else may be better? Of does this color always exist in a plain android app with no styles or colors?
I see it at the top of the file...
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Can you describe (briefly) in the PR description, how you found the solution?
Related code in the stacktrace is:
- https://github.com/androidx/androidx/blob/eb9bb69458e843b95602ba7f32210c0808293c1f/appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatCheckBox.java#L81
- https://github.com/androidx/androidx/blob/eb9bb69458e843b95602ba7f32210c0808293c1f/appcompat/appcompat/src/main/java/androidx/appcompat/widget/AppCompatCompoundButtonHelper.java#L80
|
Hi, |
|
Looking at timestamps, it looks to me that 8.0.90-ci.net8.24459.1 was compiled before this fix was merged. |
|
Ah okay. I will try again tomorrow. |
Description
In the styles.xml file, I noticed that
Widget.Material3.CompoundButton.CheckBoxis set as the parent forMauiCheckBox. However, Maui.MainTheme hasTheme.MaterialComponents.DayNightas its parent.After changing the parent of
Maui.MainThemetoTheme.Material3.DayNight.NoActionBar, the error disappeared, but I had some reservations about whether that was the right solution.So I dug deeper and found in
src/Core/AndroidNative/maui/build/intermediates/incremental/release/mergeReleaseResources/merger.xmlthe following codeIssues Fixed
Fixes #18897
Fixes #24602