java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bignerdranch.android.photogallery/com.bignerdranch.android.photogallery.PhotoGalleryActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setAdapter(android.support.v7.widget.RecyclerView$Adapter)' 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

Solutions on the web

via Stack Overflow by Boulbi
, 1 year ago
Unable to start activity ComponentInfo{com.bignerdranch.android.photogallery/com.bignerdranch.android.photogallery.PhotoGalleryActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setAdapter(android.support.v7.widget.RecyclerView$Adapter)' on a null object reference
via Stack Overflow by harsh
, 5 months ago
Unable to start activity ComponentInfo{h.safmical.swipe/h.safmical.swipe.recycle_view}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setAdapter(android.support.v7.widget.RecyclerView$Adapter)' on a null object reference
via Stack Overflow by Ryan
, 4 months ago
Unable to start activity ComponentInfo{com.example.android.budgetcrunch/com.example.android.budgetcrunch.FragmentActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setAdapter(android.support.v7.widget.RecyclerView$Adapter)' on a null object reference
via Stack Overflow by Aavgeen singh
, 5 months ago
Unable to start activity ComponentInfo{com.example.aavgeensingh.shuddhi/com.example.aavgeensingh.shuddhi.Activities.aboutActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setAdapter(android.support.v7.widget.RecyclerView$Adapter)' on a null object reference
via Stack Overflow by krzk
, 10 months ago
Unable to start activity ComponentInfo{co.scuer.licznik/co.scuer.licznik.EventsActivity}: 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 prem
, 8 months ago
Unable to start activity ComponentInfo{com.example.prem.weatherapplication/com.example.prem.weatherapplication.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
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bignerdranch.android.photogallery/com.bignerdranch.android.photogallery.PhotoGalleryActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setAdapter(android.support.v7.widget.RecyclerView$Adapter)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)

Users with the same issue

16 times, 10 months ago
429 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 10 months ago
9 times, 11 months ago
6 times, 4 months ago
110 more bugmates

Know the solutions? Share your knowledge to help other developers to debug faster.