android:RecyclerView stopSmoothScrolle()空指针异常

时间:2015-08-11 08:40:14

标签: android nullpointerexception android-recyclerview

[已结束]阅读下面我的最后评论。

我有一个带有一些片段的PagerView,它正在运行,但今天出乎意料地崩溃了。它只显示这个日志,我试图用断点捕获错误,但我没有得到任何东西。

你有什么想法吗?

这是我的日志

java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView$LayoutManager.stopSmoothScroller()' on a null object reference
            at android.support.v7.widget.RecyclerView.stopScrollersInternal(RecyclerView.java:1229)
            at android.support.v7.widget.RecyclerView.stopScroll(RecyclerView.java:1221)
            at android.support.v7.widget.RecyclerView.onDetachedFromWindow(RecyclerView.java:1426)
            at android.view.View.dispatchDetachedFromWindow(View.java:13560)
            at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2837)
            at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:2834)
            at android.view.ViewGroup.removeViewInternal(ViewGroup.java:4220)
            at android.view.ViewGroup.removeViewInternal(ViewGroup.java:4193)
            at android.view.ViewGroup.removeView(ViewGroup.java:4124)
            at android.support.v4.view.ViewPager.removeView(ViewPager.java:1326)
            at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1055)
            at android.support.v4.app.FragmentManagerImpl.detachFragment(FragmentManager.java:1290)
            at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:724)
            at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1499)
            at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:488)
            at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:141)
            at android.support.v4.view.ViewPager.populate(ViewPager.java:1073)
            at android.support.v4.view.ViewPager.populate(ViewPager.java:919)
            at android.support.v4.view.ViewPager$3.run(ViewPager.java:249)
            at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
            at android.view.Choreographer.doCallbacks(Choreographer.java:580)
            at android.view.Choreographer.doFrame(Choreographer.java:549)
            at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
            at android.os.Handler.handleCallback(Handler.java:739)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5254)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

0 个答案:

没有答案