首页 > 解决方案 > 原因:java.lang.ClassNotFoundException:在路径上找不到类“android.support.v4.animation.AnimatorCompatHelper”:DexPathList [[zip 文件

问题描述

尝试在 android 的回收站视图中删除元素时出现以下错误。

Caused by: java.lang.ClassNotFoundException: Didn't find class 
          "android.support.v4.animation.AnimatorCompatHelper" on path: DexPathList[[zip file

虽然元素被删除,但应用程序崩溃了。如果我需要更改应用程序 gradle 文件或构建 gradle 文件中的某些内容,请告诉我。请帮帮我。

完整异常跟踪:06-11 12:42:07.867 29844-29844/com.application.aayush.geeta E/AndroidRuntime:致命异常:主进程:com.application.aayush.geeta,PID:29844 java.lang.NoClassDefFoundError:解析失败:Landroid/support/v4/animation/AnimatorCompatHelper;在 android.support.v7.widget.DefaultItemAnimator.resetAnimation(DefaultItemAnimator.java:515) 在 android.support.v7.widget.DefaultItemAnimator.animateRemove(DefaultItemAnimator.java:

此外,当我尝试调试时,我收到以下错误:

Error:Execution failed for task ':app:lint'.
Lint found errors in the project; aborting build.
Fix the issues identified by lint, or add the following to your build script 
to proceed with errors:
...
android {
    lintOptions {
       abortOnError false
   }
}
...

标签: javaandroid

解决方案


使用这个库,它解决了我的问题

编译'com.github.h6ah4i:android-advancedrecyclerview:develop-SNAPSHOT'


推荐阅读