java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.vadik.alfatest/com.example.vadik.alfatest.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'android.view.MenuItem android.view.Menu.findItem(int)' 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

,

Create an empty public constructor in your code.

Solutions on the web

via Stack Overflow by xebeche
, 1 year ago
Unable to start activity ComponentInfo{com.example.vadik.alfatest/com.example.vadik.alfatest.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'android.view.MenuItem android.view.Menu.findItem(int)' on a null object reference
via GitHub by Splaktar
, 2 years ago
Unable to start activity ComponentInfo{org.gdg.frisbee.android/org.gdg.frisbee.android.eventseries.TaggedEventSeriesActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'android.view.MenuItem android.view.MenuItem.setChecked(boolean)' on a null object reference
via Stack Overflow by AndreC510
, 11 months ago
Unable to start activity ComponentInfo{com.example.andre.stattracker/com.example.andre.stattracker.ManageTeams}: java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
via Stack Overflow by Eddiezeit
, 8 months ago
Unable to start activity ComponentInfo{com.memo.android.memo/com.memo.android.memo.ListActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
via GitHub by terrorist96
, 4 months ago
Unable to start activity ComponentInfo{de.robv.android.xposed.installer/de.robv.android.xposed.installer.WelcomeActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
via Stack Overflow by barutto
, 10 months ago
Unable to start activity ComponentInfo{com.example.lenovo.projectlist/com.example.lenovo.projectlist.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'int java.util.List.size()' on a null object reference
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.vadik.alfatest/com.example.vadik.alfatest.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'android.view.MenuItem android.view.Menu.findItem(int)' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)

Users with the same issue

66 times, 3 weeks ago
Once, 2 months ago
33 times, 3 months ago
8 times, 3 months ago
468 times, 4 months ago

Write tip

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