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 BobOtike
, 1 year ago
Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference
via GitHub by alistairsykes
, 1 year ago
Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference
via GitHub by alistairbrightec
, 1 year ago
Attempt to invoke virtual method 'int android.view.View.getTop()' on a null object reference
via GitHub by kibotu
, 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.turingtechnologies.materialscrollbar.ScrollingUtilities.getCurScrollState(ScrollingUtilities.java:152)
at com.turingtechnologies.materialscrollbar.ScrollingUtilities.scrollHandleAndIndicator(ScrollingUtilities.java:52)
at com.turingtechnologies.materialscrollbar.MaterialScrollBar$scrollListener.onScrolled(MaterialScrollBar.java:694)
at android.support.v7.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:4250)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep3(RecyclerView.java:3348)
at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3080)
at android.view.View.layout(View.java:16711)
at android.view.ViewGroup.layout(ViewGroup.java:5328)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1077)
at android.view.View.layout(View.java:16711)
at android.view.ViewGroup.layout(ViewGroup.java:5328)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1702)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1556)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1465)
at android.view.View.layout(View.java:16711)
at android.view.ViewGroup.layout(ViewGroup.java:5328)
at android.view.View.layout(View.java:16711)
at android.view.ViewGroup.layout(ViewGroup.java:5328)
at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1077)
at android.view.View.layout(View.java:16711)
at android.view.ViewGroup.layout(ViewGroup.java:5328)
at android.view.View.layout(View.java:16711)
at android.view.ViewGroup.layout(ViewGroup.java:5328)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:16711)
at android.view.ViewGroup.layout(ViewGroup.java:5328)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:16711)
at android.view.ViewGroup.layout(ViewGroup.java:5328)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:16711)
at android.view.ViewGroup.layout(ViewGroup.java:5328)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1702)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1556)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1465)
at android.view.View.layout(View.java:16711)
at android.view.ViewGroup.layout(ViewGroup.java:5328)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
at android.widget.FrameLayout.onLayout(FrameLayout.java:508)
at android.view.View.layout(View.java:16711)
at android.view.ViewGroup.layout(ViewGroup.java:5328)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2319)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2032)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1191)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6642)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:777)
at android.view.Choreographer.doCallbacks(Choreographer.java:590)
at android.view.Choreographer.doFrame(Choreographer.java:560)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:763)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)

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.