获得以下错误
java.lang.AbstractMethodError: abstract method "boolean android.support.v7.widget.RecyclerView$ItemAnimator.animatePersistence(android.support.v7.widget.RecyclerView$ViewHolder, android.support.v7.widget.RecyclerView$ItemAnimator$ItemHolderInfo, android.support.v7.widget.RecyclerView$ItemAnimator$ItemHolderInfo)"
at android.support.v7.widget.RecyclerView$4.processPersistent(RecyclerView.java:533)
at android.support.v7.widget.ViewInfoStore.process(ViewInfoStore.java:241)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep3(RecyclerView.java:3607)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3277)
at android.support.v7.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:1633)
at android.support.v7.widget.RecyclerView$1.run(RecyclerView.java:341)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:873)
at android.view.Choreographer.doCallbacks(Choreographer.java:685)
at android.view.Choreographer.doFrame(Choreographer.java:618)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:859)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:160)
at android.app.ActivityThread.main(ActivityThread.java:6197)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:874)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:764)
05-09 19:07:57.029 843-843 /? E / cnss-daemon:陈旧或无法访问的邻居,ndm状态:4 05-09 19:07:57.134 843-843 /? E / cnss-daemon:陈旧或无法访问的邻居,ndm状态:4 05-09 19:07:57.460 1535-1550 /? E / ActivityManager:缩略图尺寸无效:0x0
答案 0 :(得分:0)
找到问题,问题是由版本不一致造成的,在我的项目中,pom的ReactNative依赖于RecyclerView的低版本(23.0.1),而我依赖于最新版本(25.2.0)在外面,当我打开ReactNative的页面时,它会崩溃。
因此解决方案是保持相同版本的RecyclerView。