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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via GitHub by wenmingvs
, 1 year ago
Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference
via GitHub by wenmingvs
, 1 year ago
Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference
via GitHub by wenmingvs
, 1 year ago
Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference
via GitHub by wenmingvs
, 1 year ago
Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference
via GitHub by wenmingvs
, 1 year ago
Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference
via GitHub by wenmingvs
, 1 year ago
Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference
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:3972)
at android.support.v7.widget.RecyclerView.setScrollState(RecyclerView.java:1194)
at android.view.View.dispatchTouchEvent(View.java:9993)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2828)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2499)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2514)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2514)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2514)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2514)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2514)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2839)
at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2831)
at android.view.View.dispatchPointerEvent(View.java:10228)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5350)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:5186)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4626)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4679)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4645)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4787)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4653)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4844)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4626)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4679)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4645)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4653)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4626)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:7323)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:7201)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:7162)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7433)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:323)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:7224)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:134)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.