koleton icon indicating copy to clipboard operation
koleton copied to clipboard

Two views has same id error

Open smhdk opened this issue 4 years ago • 8 comments

Hi, The following error is occurring.

Fatal Exception: java.lang.IllegalArgumentException Wrong state class, expecting View State but received class androidx.recyclerview.widget.RecyclerView$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/rv_popular_show. Make sure other views do not use the same id.

smhdk avatar Feb 12 '21 20:02 smhdk

Hi, Getting the following error for all RecyclerView implementation after adding this library. `View.java line

Caused by java.lang.IllegalArgumentException Wrong state class, expecting View State but received class androidx.recyclerview.widget.RecyclerView$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/recyclerToday. Make sure other views do not use the same id.`

dew-achlesh avatar Jun 08 '21 13:06 dew-achlesh

Hi @smhdk @AchleshK

Sorry for the late reply.

I couldn't reproduce this issue. Can you please provide more information about your code?

Thank you for your feedback. It is appreciated.

ericktijerou avatar Aug 03 '21 01:08 ericktijerou

Same issue here. Just call loadSkeleton() method on a recyclerView in FragmentA. navigate from FragmentA to FragmentB. and then when press back button to come back to FragmentA, this exception occures. Please tell me if you need more info

ghost avatar May 05 '22 10:05 ghost

I'm getting the same error. The scenario is the same as reported by @babak-gholampour.

jaelson-wagner avatar Jun 22 '22 17:06 jaelson-wagner

Found workaround: add android:saveEnabled="false" to RecyclerView

mdrlzy avatar Sep 09 '22 00:09 mdrlzy

This is happening in BottomNavigationView as well and when you change the theme, so a recreation happens the issue occurs there as well.

vullnetlimani avatar Mar 04 '23 17:03 vullnetlimani

Same issue with same behavior.

sevaktahmazyan avatar Aug 01 '23 12:08 sevaktahmazyan