java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.v7.widget.RecyclerView$LayoutManager android.support.v7.widget.RecyclerView.getLayoutManager()' on a null object reference

Stack Overflow | user1754499 | 3 months ago
  1. 0

    RecyclerView - Alternating layouts

    Stack Overflow | 3 months ago | user1754499
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.v7.widget.RecyclerView$LayoutManager android.support.v7.widget.RecyclerView.getLayoutManager()' on a null object reference
  2. 0

    App Crashes after moving main recycler view from content_main to another layout in my res files

    Stack Overflow | 4 months ago | Anfernee
    java.lang.RuntimeException: Unable to start activity ComponentInfo{pv.devclub.spartans/pv.devclub.spartans.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setLayoutManager(android.support.v7.widget.RecyclerView$LayoutManager)' on a null object reference
  3. 0

    JAVA NullPointerException error (School project)

    Stack Overflow | 3 months ago | TimV
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setLayoutManager(android.support.v7.widget.RecyclerView$LayoutManager)' on a null object reference
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Android TabLayout inside Fragment

    Stack Overflow | 10 months ago | Jacques Krause
    java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setLayoutManager(android.support.v7.widget.RecyclerView$LayoutManager)' on a null object reference
  6. 0

    How to have grid display with Firebase RecyclerAdapter

    Stack Overflow | 3 weeks ago | John
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.downer.localys/com.example.downer.localys.ShowProducts}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setLayoutManager(android.support.v7.widget.RecyclerView$LayoutManager)' on a null object reference

    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 'android.support.v7.widget.RecyclerView$LayoutManager android.support.v7.widget.RecyclerView.getLayoutManager()' on a null object reference

      at com.example.wsdw.MainActivity.onOptionsItemSelected()
    2. com.example.wsdw
      MainActivity.onOptionsItemSelected
      1. com.example.wsdw.MainActivity.onOptionsItemSelected(MainActivity.java:50)
      1 frame
    3. Android Platform
      Activity.onMenuItemSelected
      1. android.app.Activity.onMenuItemSelected(Activity.java:2908)
      1 frame
    4. Android Support v4
      FragmentActivity.onMenuItemSelected
      1. android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:406)
      1 frame
    5. Android v7
      AppCompatDelegateImplV9.onMenuItemSelected
      1. android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:195)
      2. android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:103)
      3. android.support.v7.app.AppCompatDelegateImplV9.onMenuItemSelected(AppCompatDelegateImplV9.java:667)
      3 frames
    6. android.support.v7
      MenuBuilder.performItemAction
      1. android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:810)
      2. android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:152)
      3. android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:957)
      4. android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:947)
      4 frames
    7. Android v7
      ActionMenuView.invokeItem
      1. android.support.v7.widget.ActionMenuView.invokeItem(ActionMenuView.java:616)
      1 frame
    8. android.support.v7
      ActionMenuItemView.onClick
      1. android.support.v7.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:153)
      1 frame
    9. Android Platform
      ActivityThread.main
      1. android.view.View.performClick(View.java:5198)
      2. android.view.View$PerformClick.run(View.java:21147)
      3. android.os.Handler.handleCallback(Handler.java:739)
      4. android.os.Handler.dispatchMessage(Handler.java:95)
      5. android.os.Looper.loop(Looper.java:148)
      6. android.app.ActivityThread.main(ActivityThread.java:5417)
      6 frames
    10. Java RT
      Method.invoke
      1. java.lang.reflect.Method.invoke(Native Method)
      1 frame
    11. Android
      ZygoteInit.main
      1. com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
      2. com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
      2 frames