java.lang.IllegalArgumentException: Wrong state class, expecting View State but received class com.google.android.material.button.MaterialButton$SavedState instead. This usually happens when two views of different type have the same id in the same hierarchy. This view's id is id/cancel. Make sure other views do not use the same id.
at android.view.View.onRestoreInstanceState(View.java:19998)
at android.view.View.dispatchRestoreInstanceState(View.java:19970)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3952)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3952)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3952)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3952)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3952)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3952)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3952)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3952)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3952)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3952)
at android.view.ViewGroup.dispatchRestoreInstanceState(ViewGroup.java:3952)
at android.view.View.restoreHierarchyState(View.java:19948)
at com.android.internal.policy.PhoneWindow.restoreHierarchyState(PhoneWindow.java:2162)
at android.app.Activity.onRestoreInstanceState(Activity.java:1602)
at android.app.Activity.performRestoreInstanceState(Activity.java:1557)
at android.app.Instrumentation.callActivityOnRestoreInstanceState(Instrumentation.java:1353)
at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3380)
at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2073)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:225)
at android.app.ActivityThread.main(ActivityThread.java:7563)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:994)