java.lang.NullPointerException

Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web21093

  • Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference
  • Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference
  • Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference
  • Stack trace

    • java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference at com.wenming.weiswift.ui.login.fragment.home.weiboitemdetail.activity.BaseDetailActivity$6.onScrollStateChanged(BaseDetailActivity.java:334) at android.support.v7.widget.RecyclerView.dispatchOnScrollStateChanged(RecyclerView.java:4286) at android.support.v7.widget.RecyclerView.setScrollState(RecyclerView.java:1246) at android.support.v7.widget.RecyclerView.access$3900(RecyclerView.java:151) at android.support.v7.widget.RecyclerView$ViewFlinger.fling(RecyclerView.java:4463) at android.support.v7.widget.RecyclerView.fling(RecyclerView.java:1897) at android.support.v7.widget.RecyclerView.onTouchEvent(RecyclerView.java:2670) at android.view.View.dispatchTouchEvent(View.java:8981) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2698) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2410) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2709) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2425) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2709) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2425) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2709) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2425) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2709) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2425) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2709) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2425) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2709) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2425) at com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2559) at com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1767) at android.app.Activity.dispatchTouchEvent(Activity.java:2866) at com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2520) at android.view.View.dispatchPointerEvent(View.java:9186) at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4704) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4542) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4070) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4123) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4089) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4199) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4097) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4256) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4070) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4123) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4089) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4097) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4070) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6563) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6453) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6424) at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:6653) at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185) at android.os.MessageQueue.nativePollOnce(Native Method) at android.os.MessageQueue.next(MessageQueue.java:143) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:5942) 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:1399) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    You’re the first here who have seen this exception.