android-advancedrecyclerview: AnimatorCompatHelper Class Not Found Exception using AppCompat 26.0.0
When using compat library 26.0.0 the app crash when doing Recyclerview Animations
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/animation/AnimatorCompatHelper;
at com.h6ah4i.android.widget.advrecyclerview.animator.impl.BaseItemAnimationManager.resetAnimation(BaseItemAnimationManager.java:161)
at com.h6ah4i.android.widget.advrecyclerview.animator.RefactoredDefaultItemAnimator$DefaultItemMoveAnimationManager.addPendingAnimation(RefactoredDefaultItemAnimator.java:312)
at com.h6ah4i.android.widget.advrecyclerview.animator.GeneralItemAnimator.animateMove(GeneralItemAnimator.java:88)
at android.support.v7.widget.SimpleItemAnimator.animatePersistence(SimpleItemAnimator.java:140)
at android.support.v7.widget.RecyclerView$4.processPersistent(RecyclerView.java:543)
at android.support.v7.widget.ViewInfoStore.process(ViewInfoStore.java:239)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep3(RecyclerView.java:3761)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3419)
at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3960)
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 9
- Comments: 35 (5 by maintainers)
Commits related to this issue
- Fix bug with advanced recycler view library https://github.com/h6ah4i/android-advancedrecyclerview/issues/396 #Apps-1408 fixed — committed to StepicOrg/stepik-android by KirillMakarov 7 years ago
Hi, guys. Sorry for the inconvenience š
I am going to start working for the new support libraries v26.0.0. Hopefully, I can manage all features work well with the new libraries soonā¦
Iāve just pushed a new branch which bumps support libraries to v26. I am now working on this branch and its still a pre-stable version.
If you want to try it out now, please add the following jitpack configuration to
build.gradle.@FredDev06 @SUKI-Huang Iām using develop branch as workaround:
compile 'com.github.h6ah4i:android-advancedrecyclerview:develop-SNAPSHOT'Any updates on this? Android O just got officially released by the way yesterday, which means weāre still waiting for an official fix on the main branch.
@svenoaks, @devjta, @SUKI-Huang, @tdtran, @AXwjg, @fdonzello
Hi all, sorry for the very late response š
I have just released v0.11.0 today and it includes the fix of this issue, so I am going to close this issue within a few days.
I am afraid that this might be a regression of the latest release.
I hope this issue would be solved by implementing the new
onItemDragStarted() / onItemDragFinished()methods. Please read the following migration guide for more detials. (If you still see the issue with v0.11.0 , please create a new issue report.) Thanks.0.10.xto0.11.0#425Creating the AnimatorCompatHelper class seems to work but not sure if totally safe.
compile 'com.github.h6ah4i:android-advancedrecyclerview:develop-SNAPSHOT'has weird animation when item is dragged to new position that wasnāt present in older.This solution worked for me: https://stackoverflow.com/questions/43320496/noclassdeffounderror-android-support-v4-animation-animatorcompathelper
Added to the bottom of the build.gradle (Module:app):
configurations.all { resolutionStrategy.eachDependency { DependencyResolveDetails details -> def requested = details.requested if (requested.group == ācom.android.supportā) { if (!requested.name.startsWith(āmultidexā)) { details.useVersion ā25.4.0ā } } } }
I am about to publish my app in which I used this library. So, I would like to know whether I should wait for its stable release or pre-stable version (feature~support_libraries_v26-SNAPSHOT) is also fine.
@h6ah4i tried it, and still crashing
and yes, I have cleaned and reinstalled,
EDIT
Solved with
I made a pull request with a temporally fix using appcompat 25.3.1
Heās alive!!! Thanks man.
Yeah, was barking at the wrong tree š Found the error/cultrip for itā¦
But if you have to wait for external programs + HAVE to use the Android 8.0/Oreo SDK, just create the class with the HoneyCombImplementation:
Create class: android.support.v4.animation.AnimatorCompatHelper
public class AnimatorCompatHelper { private static TimeInterpolator mDefaultInterpolator; public static void clearInterpolator(View view){ if(view != null){ if (mDefaultInterpolator == null) { mDefaultInterpolator = new ValueAnimator().getInterpolator(); } view.animate().setInterpolator(mDefaultInterpolator); } } }
Has this issue of NoClassDefFoundError been fixed?
Same here! The snapshot version with support library 26 does not seem to be available anymore. š
does not available now ? I got an error this morning