-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Android] "Failed to inflate ColorStateList" error is logged when setting Color to CheckBox #18897
Comments
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process. |
Exact same problem here with Android 13 and MAUI 8.0.3 |
Verified this on Visual Studio Enterprise 17.9.0 Preview 2 (.Net8.0). Repro on Android 14.0-API34 with below project. |
I'm getting this error too. Our page is similar to a survey where it is defined by a admin who lays out the questions and answers. If you get enough of the checkboxes on the UI the app hangs/crashes. |
According to my tests, this error doesn't even need the color to be set to occur. Steps to reproduce:
|
Workaround working for me to stop the exception:
|
@Larhei i tried and i get the error invalid file path. API2144 for this files during the build |
In my cspro Worked for me with maui 8.0.6 and vs 17.8.4 and dont forget to clean your bin/xxx/Android folder ;-) |
@Larhei thanks Add a new Folder colors to Platforms/Android/Resources i created the colors folder instead of color. all good now. i am not getting the exception now. thanks a lot for the heads up. |
This hasn't been fixed yet... |
Thanks for this. Worked like a charm. I didn't need to add lines to my .csproj file. Just adding the files to Platforms/Android/Resources/color and settings the items to android:color="#FFFFFF" was enough. I didn't set the build action to AndroidResource either. That isn't available. Running VS 17.8.5 and Maui 8.0.6. |
…e I want to continue with the full refactor since the views have started to exhibit some very strange bugs that are a little bit trickier to track down than I would like. Also implemented a work around described here dotnet/maui#18897 for the checkbox error that was being logged.
This work around is still required in 9.0.100-preview.5.24307.3 visualstudio 17.11.0 preview 2.1 |
worked like a charm! |
Shoutout to Larhei! I hope someone gives him/her/them a cookie! I did not need step 4, but the first three resolved the issue for me. |
Description
When setting
Color
toCheckBox
on Android, the following error is logged, even if the functionality seems to work:Is this hidding some kind of bug? Is it possible to avoid this log?
Steps to Reproduce
Link to public reproduction project repository
https://github.com/tranb3r/Issues/tree/main/MauiAppMaterialButtonAndCheckbox
Version with bug
8.0.3
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 14
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: