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 Aadesh Chaudhary
, 1 year ago
Attempt to invoke virtual method 'void android.support.v4.app.Fragment.setMenuVisibility(boolean)' on a null object reference
via Stack Overflow by Bright Varghese
, 1 year ago
Attempt to invoke virtual method 'void android.support.v4.app.Fragment.setMenuVisibility(boolean)' on a null object reference
via Stack Overflow by sayres kabir
, 8 months ago
Attempt to invoke virtual method 'void android.support.v4.app.Fragment.setMenuVisibility(boolean)' on a null object reference
via Stack Overflow by Gone
, 6 months ago
Attempt to invoke virtual method 'void android.support.v4.app.Fragment.setMenuVisibility(boolean)' on a null object reference
via Stack Overflow by Przemysław Moskal
, 2 weeks ago
Attempt to invoke virtual method 'android.support.v4.app.FragmentTransaction android.support.v4.app.FragmentTransaction.add(int, android.support.v4.app.Fragment)' on a null object reference
via Stack Overflow by Sagar Chavada
, 2 years ago
Attempt to invoke virtual method 'void android.support.v4.app.Fragment.setMenuVisibility(boolean)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v4.app.Fragment.setMenuVisibility(boolean)' on a null object reference	at android.support.v4.app.FragmentStatePagerAdapter.instantiateItem(FragmentStatePagerAdapter.java:120)	at android.support.v4.view.ViewPager.addNewItem(ViewPager.java:1006)	at android.support.v4.view.ViewPager.populate(ViewPager.java:1220)	at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:670)	at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:632)	at android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:613)	at com.example.aadesh.khabriuncle.DashboardActivity$1.onTabSelected(DashboardActivity.java:111)	at android.support.design.widget.TabLayout.dispatchTabSelected(TabLayout.java:1149)	at android.support.design.widget.TabLayout.selectTab(TabLayout.java:1142)	at android.support.design.widget.TabLayout.selectTab(TabLayout.java:1112)	at android.support.design.widget.TabLayout$Tab.select(TabLayout.java:1407)	at android.support.design.widget.TabLayout$TabView.performClick(TabLayout.java:1511)	at android.view.View$PerformClick.run(View.java:19881)	at android.os.Handler.handleCallback(Handler.java:739)	at android.os.Handler.dispatchMessage(Handler.java:95)	at android.os.Looper.loop(Looper.java:135)	at android.app.ActivityThread.main(ActivityThread.java:5292)	at java.lang.reflect.Method.invoke(Native Method)	at java.lang.reflect.Method.invoke(Method.java:372)	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699)