java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Showing/hiding submenus with OnClick menu
    via Stack Overflow by user18497
    ,
    • java.lang.NullPointerException: Attempt to invoke interface method 'boolean android.view.MenuItem.isVisible()' on a null object reference at com.example.user.app.MainActivity.onNavigationItemSelected(MainActivity.java:132) at android.support.design.widget.NavigationView$1.onMenuItemSelected(NavigationView.java:153) at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:810) at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:152) at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:957) at android.support.design.internal.NavigationMenuPresenter$1.onClick(NavigationMenuPresenter.java:328) at android.view.View.performClick(View.java:5233) at android.view.View$PerformClick.run(View.java:21209) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:152) at android.app.ActivityThread.main(ActivityThread.java:5507) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
    No Bugmate found.