java.lang.ClassCastException: android.view.AbsSavedState$1 cannot be cast to android.support.v7.widget.Toolbar$SavedState

后端 未结 4 711
情话喂你
情话喂你 2020-12-06 06:33

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

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-06 07:17

    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.

提交回复
热议问题