Attempt to invoke virtual method ‘void android.app.ActionBar.setDisplayShowHomeEnabled(boolean)’ on a null object reference

getting this error
2019-11-27 11:55:27.598 8884-8884/com.bizpitstop E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.bizpitstop, PID: 8884
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bizpitstop/com.bizpitstop1.MapActivity}: java.lang.NullPointerException: Attempt to invoke virtual method ‘void android.app.ActionBar.setDisplayShowHomeEnabled(boolean)’ on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2946)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:201)
at android.app.ActivityThread.main(ActivityThread.java:6806)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
Caused by: java.lang.NullPointerException: Attempt to invoke virtual method ‘void android.app.ActionBar.setDisplayShowHomeEnabled(boolean)’ on a null object reference
at com.bizpitstop1.MapActivity.CustomActionBar(MapActivity.java:900)
at com.bizpitstop1.MapActivity.onCreate(MapActivity.java:181)
at android.app.Activity.performCreate(Activity.java:7224)
at android.app.Activity.performCreate(Activity.java:7213)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2926)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081) 
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831) 
at android.os.Handler.dispatchMessage(Handler.java:106) 
at android.os.Looper.loop(Looper.java:201) 
at android.app.ActivityThread.main(ActivityThread.java:6806) 
at java.lang.reflect.Method.invoke(Native Method) 
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873) 
2019-11-27 11:55:27.616 8884-8884/com.bizpitstop I/Process: Sending signal. PID: 8884 SIG: 9

Archive from: https://stackoverflow.com/questions/59064359/attempt-to-invoke-virtual-method-void-android-app-actionbar-setdisplayshowhomee

Share

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *