Open rubengees opened 5 years ago
Hi, thanks for reporting.
Here is the relevant class from this library:
https://github.com/consp1racy/android-support-preference/blob/2.x/support-preference/src/main/java/net/xpece/android/support/widget/AspSwitchCompat.java which extends android.support.v7.widget.SwitchCompat -> androidx.appcompat.widget.SwitchCompat
The class doesn't work with resources at all, everything is handled by the underlying AndroidX implmentation.
Here are some SO questions that may be related: https://stackoverflow.com/questions/50471888/android-app-bundle-introduces-resource-not-found-crash-in-android-app https://stackoverflow.com/questions/51228226/resource-not-found-error-res-drawable-abc-switch-thumb-material-xml-after-adding?noredirect=1&lq=1
I will remove AspSwitchCompat
in the next version because it's no longer needed but the error will remain. I don't think I can fix it in this library.
Thought so, thanks!
There is no branch currently in which the dependency on AspSwitchCompat
is already removed correct?
It's a waste of time, but I think it's gone in 3.x already. In any case you can copy the switch preference layout to your project and it will override the file provided by this library. In xml replace AspSwitchCompat with SwitchCompat.
What versions of Android did this happen on?
Ah okay great, I'll try with 3.x then.
This happens on all versions I think, but I'm seeing mostly 9 and 8 since that is what of my users have.
Version:
2.3.2
Support preference Version:AndroidX 1.1.0-alpha04
I get the following crash ocassionally reported by users and the play store console:
This may be caused by an Android bug, backups or users sharing split APKs from what I read on stackoverflow, but thought I let you know, since it might be related to the library. It always happens in the settings screen and nowhere else in my app.
Thanks for looking into it!