java.lang.NullPointerException

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

Samebug tips0

We couldn't find tips for this exception.

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

Solutions on the web164

  • via Stack Overflow by maxxxo
    ,
  • Stack trace

    • java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setDrawingCacheBackgroundColor(int)' on a null object reference at android.widget.AbsListView.obtainView(AbsListView.java:2494) at android.widget.ListView.makeAndAddView(ListView.java:1894) at android.widget.ListView.fillDown(ListView.java:710) at android.widget.ListView.fillSpecific(ListView.java:1372) at android.widget.ListView.layoutChildren(ListView.java:1673) at android.widget.AbsListView.onLayout(AbsListView.java:2227) at android.view.View.layout(View.java:15912) at android.view.ViewGroup.layout(ViewGroup.java:5108) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:633) at android.widget.FrameLayout.onLayout(FrameLayout.java:568) at android.view.View.layout(View.java:15912) at android.view.ViewGroup.layout(ViewGroup.java:5108) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1195) at android.view.View.layout(View.java:15912) at android.view.ViewGroup.layout(ViewGroup.java:5108) at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1627) at android.view.View.layout(View.java:15912) at android.view.ViewGroup.layout(ViewGroup.java:5108) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1195) at android.view.View.layout(View.java:15912) at android.view.ViewGroup.layout(ViewGroup.java:5108) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:633) at android.widget.FrameLayout.onLayout(FrameLayout.java:568) at android.view.View.layout(View.java:15912) at android.view.ViewGroup.layout(ViewGroup.java:5108) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1195) at android.view.View.layout(View.java:15912) at android.view.ViewGroup.layout(ViewGroup.java:5108) at android.support.v4.view.ViewPager.onLayout(ViewPager.java:1627) at android.view.View.layout(View.java:15912) at android.view.ViewGroup.layout(ViewGroup.java:5108) at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1195) at android.view.View.layout(View.java:15912) at android.view.ViewGroup.layout(ViewGroup.java:5108) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:633) at android.widget.FrameLayout.onLayout(FrameLayout.java:568) at android.view.View.layout(View.java:15912) at android.view.ViewGroup.layout(ViewGroup.java:5108) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1959) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1813) at android.widget.LinearLayout.onLayout(LinearLayout.java:1722) at android.view.View.layout(View.java:15912) at android.view.ViewGroup.layout(ViewGroup.java:5108) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:633) at android.widget.FrameLayout.onLayout(FrameLayout.java:568) at android.view.View.layout(View.java:15912) at android.view.ViewGroup.layout(ViewGroup.java:5108) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2460) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2152) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1277) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6483) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:802) at android.view.Choreographer.doCallbacks(Choreographer.java:605) at android.view.Choreographer.doFrame(Choreographer.java:574) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:788) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5549) 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:964) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:759)

    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

    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    sbattaglinosbattaglino
    Once,
    FreeZyFreeZy
    4 times, last one
    25 more bugmates