Actionbar in Android Null Pointer Exception -


i getting below null pointer exception actionbar

caused by: java.lang.nullpointerexception: attempt invoke virtual method 'void android.support.v7.app.actionbar.setdisplayhomeasupenabled(boolean)' on null object reference 

i have used appcompatactivity extending activity , have changed in styles.xml in below way

item name="windowactionbar">true</item> 

but still getting same error. tried changing getactionbar getsupportactionbar() still same error.

i using these imports

import android.support.v4.app.actionbardrawertoggle; import android.support.v4.widget.drawerlayout; import android.support.v7.app.appcompatactivity; import android.support.v7.widget.toolbar; 

i getting below null pointer exception actionbar please help.

i think not using appcompact theme


Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -