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

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 Stack Overflow by Anfernee
, 1 year ago
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
via Stack Overflow by user3451238
, 1 year ago
Unable to start activity ComponentInfo{com.example.sajdour.fcg_sajdour/com.example.sajdour.fcg_sajdour.UI.Videos}: 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
via GitHub by amir19422
, 1 month ago
Unable to start activity ComponentInfo{com.example.sharif.boomtest/com.example.sharif.boomtest.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.app.ActionBar.setDisplayShowHomeEnabled(boolean)' on a null object reference
via Stack Overflow by Asdemuertes
, 8 months ago
Unable to start activity ComponentInfo{com.example.usuari.myapplication3/com.example.usuari.myapplication3.ViatgeDetall}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.app.ActionBar.setTitle(java.lang.CharSequence)' on a null object reference
via Stack Overflow by Spartan123
, 9 months ago
Unable to start activity ComponentInfo{com.example.XXXXXXXXX.computerscienceinduction/com.example.XXXXXXXXX.computerscienceinduction.LoggedInMenu}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.app.ActionBarDrawerToggle.syncState()' on a null object reference
via Stack Overflow by lost2121
, 1 month ago
Unable to start activity ComponentInfo{ir.co.pba.mkamali.myapplication/ir.co.pba.mkamali.myapplication.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.app.ActionBar.hide()' on a null object reference
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
at pv.devclub.spartans.MainActivity.onCreate(MainActivity.java:124)
at android.app.Activity.performCreate(Activity.java:6876)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)

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.