java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.x.x.items.Note.getTitle()' on a null object reference

Stack Overflow | Diego Marrs | 4 months ago
  1. 0

    Android - My RecyclerView Data is not Displaying

    Stack Overflow | 4 months ago | Diego Marrs
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.x.x.items.Note.getTitle()' on a null object reference
  2. 0
    The resource was accessed after it was dismissed.
  3. 0
    Initialize the variable before calling a method on it.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    Use 'dialog' to access views from custom_layout layout.
  6. 0
    The parsed JSON does not contains the requested field.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'java.lang.String com.x.x.items.Note.getTitle()' on a null object reference

      at com.x.x.adapters.ListAdapter$NoteViewHolder.bindNote()
    2. com.x.x
      ListAdapter.onBindViewHolder
      1. com.x.x.adapters.ListAdapter$NoteViewHolder.bindNote(ListAdapter.java:88)
      2. com.x.x.adapters.ListAdapter.onBindViewHolder(ListAdapter.java:56)
      2 frames
    3. Android v7
      RecyclerView.onLayout
      1. android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:5471)
      2. android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:5504)
      3. android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4741)
      4. android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:4617)
      5. android.support.v7.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:1994)
      6. android.support.v7.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1390)
      7. android.support.v7.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1353)
      8. android.support.v7.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:574)
      9. android.support.v7.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:3028)
      10. android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:2906)
      11. android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3283)
      11 frames
    4. Android Platform
      ActivityThread.main
      1. android.view.View.layout(View.java:15654)
      2. android.view.ViewGroup.layout(ViewGroup.java:4969)
      3. android.widget.RelativeLayout.onLayout(RelativeLayout.java:1077)
      4. android.view.View.layout(View.java:15654)
      5. android.view.ViewGroup.layout(ViewGroup.java:4969)
      6. android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
      7. android.widget.FrameLayout.onLayout(FrameLayout.java:508)
      8. android.view.View.layout(View.java:15654)
      9. android.view.ViewGroup.layout(ViewGroup.java:4969)
      10. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1705)
      11. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1559)
      12. android.widget.LinearLayout.onLayout(LinearLayout.java:1468)
      13. android.view.View.layout(View.java:15654)
      14. android.view.ViewGroup.layout(ViewGroup.java:4969)
      15. android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
      16. android.widget.FrameLayout.onLayout(FrameLayout.java:508)
      17. android.view.View.layout(View.java:15654)
      18. android.view.ViewGroup.layout(ViewGroup.java:4969)
      19. android.widget.LinearLayout.setChildFrame(LinearLayout.java:1705)
      20. android.widget.LinearLayout.layoutVertical(LinearLayout.java:1559)
      21. android.widget.LinearLayout.onLayout(LinearLayout.java:1468)
      22. android.view.View.layout(View.java:15654)
      23. android.view.ViewGroup.layout(ViewGroup.java:4969)
      24. android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
      25. android.widget.FrameLayout.onLayout(FrameLayout.java:508)
      26. android.view.View.layout(View.java:15654)
      27. android.view.ViewGroup.layout(ViewGroup.java:4969)
      28. android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2102)
      29. android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1859)
      30. android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1078)
      31. android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5875)
      32. android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
      33. android.view.Choreographer.doCallbacks(Choreographer.java:580)
      34. android.view.Choreographer.doFrame(Choreographer.java:550)
      35. android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
      36. android.os.Handler.handleCallback(Handler.java:739)
      37. android.os.Handler.dispatchMessage(Handler.java:95)
      38. android.os.Looper.loop(Looper.java:135)
      39. android.app.ActivityThread.main(ActivityThread.java:5351)
      39 frames
    5. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      2. java.lang.reflect.Method.invoke(Method.java:372)
      2 frames
    6. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:908)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703)
      2 frames