引起:java.lang.ClassNotFoundException:没找到类" android.support.v4.animation.AnimatorCompatHelper"在路径上:DexPathList [[zip file

时间:2018-06-08 05:07:24

标签: java android

我在尝试删除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:189)                                                                                     在android.support.v7.widget.SimpleItemAnimator.animateDisappearance(SimpleItemAnimator.java:95)                                                                                     在android.support.v7.widget.RecyclerView.animateDisappearance(RecyclerView.java:3537)                                                                                     在android.support.v7.widget.RecyclerView $ 4.processDisappeared(RecyclerView.java:456)                                                                                     在android.support.v7.widget.ViewInfoStore.process(ViewInfoStore.java:246)                                                                                     在android.support.v7.widget.RecyclerView.dispatchLayoutStep3(RecyclerView.java:3385)                                                                                     在android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3135)                                                                                     在android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3568)                                                                                     在android.view.View.layout(View.java:17535)                                                                                     在android.view.ViewGroup.layout(ViewGroup.java:5616)                                                                                     在android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)                                                                                     在android.view.View.layout(View.java:17535)                                                                                     在android.view.ViewGroup.layout(ViewGroup.java:5616)                                                                                     在android.widget.RelativeLayout.onLayout(RelativeLayout.java:1079)                                                                                     在android.view.View.layout(View.java:17535)                                                                                     在android.view.ViewGroup.layout(ViewGroup.java:5616)                                                                                     在android.support.design.widget.HeaderScrollingViewBehavior.layoutChild(HeaderScrollingViewBehavior.java:131)                                                                                     在android.support.design.widget.ViewOffsetBehavior.onLayoutChild(ViewOffsetBehavior.java:42)                                                                                     在android.support.design.widget.AppBarLayout $ ScrollingViewBehavior.onLayoutChild(AppBarLayout.java:1364)                                                                                     在android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:846)                                                                                     在android.view.View.layout(View.java:17535)                                                                                     在android.view.ViewGroup.layout(ViewGroup.java:5616)                                                                                     在android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:1172)                                                                                     在android.view.View.layout(View.java:17535)                                                                                     在android.view.ViewGroup.layout(ViewGroup.java:5616)                                                                                     在android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)                                                                                     在android.widget.FrameLayout.onLayout(FrameLayout.java:261)                                                                                     在android.view.View.layout(View.java:17535)                                                                                     在android.view.ViewGroup.layout(ViewGroup.java:5616)                                                                                     在android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)                                                                                     在android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)                                                                                     在android.widget.LinearLayout.onLayout(LinearLayout.java:1494)                                                                                     在android.view.View.layout(View.java:17535)                                                                                     在android.view.ViewGroup.layout(ViewGroup.java:5616)                                                                                     在android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)                                                                                     在android.widget.FrameLayout.onLayout(FrameLayout.java:261)                                                                                     在android.view.View.layout(View.java:17535)                                                                                     在android.view.ViewGroup.layout(ViewGroup.java:5616)                                                                                     在android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)                                                                                     在android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)                                                                                     在android.widget.LinearLayout.onLayout(LinearLayout.java:1494)                                                                                     在android.view.View.layout(View.java:17535)                                                                                     在android.view.ViewGroup.layout(ViewGroup.java:5616)                                                                                     在android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)                                                                                     在android.widget.FrameLayout.onLayout(FrameLayout.java:261)                                                                                     在com.android.internal.policy.DecorView.onLayout(DecorView.java:724)                                                                                     在android.view.View.layout(View.java:17535)                                                                                     在android.view.ViewGroup.layout(ViewGroup.java:5616)                                                                                     在android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2354)                                                                                     在android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2081)                                                                                     在android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1258)                                                                                     在android.view.ViewRootImpl $ TraversalRunnable.run(ViewRootImpl.java:6348)                                                                                     在android.view.Choreographer $ CallbackRecord.run(Choreographer.java:871)                                                                                     在android.view.Choreographer.doCallbacks(Choreographer.java:683)                                                                                     在android.view.Choreographer.doFrame(Choreographer.java:619)   06-11 12:42:07.870 29844-29844 / com.application.aayush.geeta E / AndroidRuntime:at android.view.Choreographer $ FrameDisplayEventReceiver.run(Choreographer.java:857)                                                                                     在android.os.Handler.handleCallback(Handler.java:751)                                                                                     在android.os.Handler.dispatchMessage(Handler.java:95)                                                                                     在android.os.Looper.loop(Looper.java:154)                                                                                     在android.app.ActivityThread.main(ActivityThread.java:6123)                                                                                     at java.lang.reflect.Method.invoke(Native Method)                                                                                     在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:867)                                                                                     在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:757)                                                                                  引起:java.lang.ClassNotFoundException:没找到类" android.support.v4.animation.AnimatorCompatHelper" on path:DexPathList [[zip file" /data/app/com.application.aayush.geeta-1/base.apk"],nativeLibraryDirectories = [/ data / app / com.application.aayush.geeta -1 / lib / arm,/ system / lib,/ vendor / lib]]                                                                                     在dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)                                                                                     at java.lang.ClassLoader.loadClass(ClassLoader.java:380)                                                                                     在java.lang.ClassLoader.loadClass(ClassLoader.java:312)

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

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
   }
}
...

2 个答案:

答案 0 :(得分:0)

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

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

答案 1 :(得分:-1)

最好的解决方法是将缺少的类复制到您的项目中。

code tree