java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.gandhjee.pantry_order/com.example.gandhjee.pantry_order.Menu}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Spinner.setAdapter(android.widget.SpinnerAdapter)' 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 Jeet Gandhi
, 1 year ago
Unable to start activity ComponentInfo{com.example.gandhjee.pantry_order/com.example.gandhjee.pantry_order.Menu}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Spinner.setAdapter(android.widget.SpinnerAdapter)' on a null object reference
via GitHub by jjhesk
, 1 year ago
Unable to start activity ComponentInfo{****}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.loopj.android.http.AsyncHttpClient.addHeader(java.lang.String, java.lang.String)' on a null object reference
via Stack Overflow by user6313669
, 1 year ago
Unable to start activity ComponentInfo{com.comida/com.comida.ListViewActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.common.api.GoogleApiClient.connect()' on a null object reference
via Stack Overflow by ASHIQ AHAMMED ASH
, 9 months ago
Unable to start activity ComponentInfo{com.pft.ashiqahammedash.myapplication/com.pft.ashiqahammedash.myapplication.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.common.api.GoogleApiClient.connect()' on a null object reference
via Stack Overflow by Tadhg
, 4 months ago
Unable to start activity ComponentInfo{com.p3_group.v2vapp/com.p3_group.v2vapp.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.p3_group.v2vapp.ListeningService.continueListening()' on a null object reference
via Stack Overflow by Jdbaba
, 2 years ago
Unable to start activity ComponentInfo{jdexamples.app13_exploringtabs/jdexamples.app13_exploringtabs.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TabHost.setup()' on a null object reference
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.gandhjee.pantry_order/com.example.gandhjee.pantry_order.Menu}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Spinner.setAdapter(android.widget.SpinnerAdapter)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)

Users with the same issue

9 times, 11 months ago
Samebug visitor profile picture
Unknown user
Once, 10 months ago
6 times, 4 months ago
184 times, 10 months ago
16 times, 10 months ago

Write tip

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