My app gets crashed frequently when it goes from background to foreground. Scenerio: Suppose iam playing any games and my app is in recent list and after playing,if i select
In my case I have created several custom components such as drop drow, Textinput, etc. all of them have some of the same structure as the same title, mandatory sign. all of the ids are the same and it wasn't a big issue at the moment as they were in different layouts.
but then it happens to occur this error
java.lang.ClassCastException: android.view.View$BaseSavedState cannot be cast to androidx.appcompat.widget.AppCompatSpinner$SavedState
then I change the all custom component inner components id to different. then the problem was solved to me.