I met this problem this morning, but I am not confronted with the same reason that was mentioned above.
Through debug, I found that the view of the element in my ViewHolder has mParent , and it is not null, that in the normal case it should not be anything (that the message in the log, βthe attached view cannot be processed,β I think that this means that if the child view is already bound to the parent, this may cause reuse to fail.)
But I did not bind the child view manually each time. And I found that this was done when I try to inflate the kind of child in my ViewHolder, something like:
layoutInflater.inflate(@LayoutRes int resource, @Nullable ViewGroup root, boolean attachToRoot)
And the last attachToRoot parameter should be false.
After I changed it to false , I fixed my problem.
By the way, I see that this failure occurred when I upgrade my support library to the latest version 25.0.0. Before I used version 23.4.0, and I do not see this problem. I assume that something needs to be changed in the latest support library.
I hope for this help.
Anthonyeef Nov 25 '16 at 7:10 2016-11-25 07:10
source share