Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android RecyclerView : Abstract method not implemented

Application crashed when swipe to delete an item from Recyclerview. Error log is as below.It was working before now updated to com.android.support:recyclerview-v7:23.1.0 and recyclerview-animators-1.2.2.jar. Now it is crashing, Please help me. Thanks in advance.

FATAL EXCEPTION: main Process: com.timecard, PID: 2876 java.lang.AbstractMethodError: abstract method not implemented at android.support.v7.widget.RecyclerView$ItemAnimator.animateChange(RecyclerView.java) at android.support.v7.widget.RecyclerView.animateChange(RecyclerView.java:3062) at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2924) at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3071) at android.view.View.layout(View.java:14817) at android.view.ViewGroup.layout(ViewGroup.java:4631) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671) at

like image 962
user1767260 Avatar asked Dec 04 '22 02:12

user1767260


2 Answers

My team faced a similar problem just yesterday. The solution is to update the recyclerview-animators used in your project to its newest version, 2.0.1:

compile 'jp.wasabeef:recyclerview-animators:2.0.1'

Appearantly it's a known issue as the developer has also mentioned about older versions's incompatibility with Support Library 23.0.1.

like image 194
Hadi Satrio Avatar answered Jan 05 '23 14:01

Hadi Satrio


To use https://github.com/wasabeef/recyclerview-animators with RecyclerView follow the Setup and update the library

Gradle

If you are using a RecyclerView 23.1.0 (released Oct 2015) or higher.

dependencies {
  // jCenter
  compile 'jp.wasabeef:recyclerview-animators:2.1.0'
}

If you are using a RecyclerView 23.0.1 or below.

dependencies {
  // jCenter
  compile 'jp.wasabeef:recyclerview-animators:1.3.0'
}
like image 20
Shajeel Afzal Avatar answered Jan 05 '23 15:01

Shajeel Afzal