You need to call getSupportActionBar()
on an ActionBarActivity
. Do not call getActionBar()
— that is not available on older devices, and for the new r21 edition of appcompat-v7
, I would expect it to return null
all the time, as the new ActionBarActivity
disables and replaces the system action bar.
More Related Contents:
- java.lang.NullPointerException $ExpandableAdapter.getGroupView
- Null pointer exception with “setDisplayHomeAsUpEnabled(boolean)” [duplicate]
- set onclick listener not working in android for moving from one fragment to another activity [duplicate]
- Android transparent status bar and actionbar
- Actionbar not shown with AppCompat
- Why does Eclipse automatically add appcompat v7 library support whenever I create a new project?
- Android. Fragment getActivity() sometimes returns null
- Use Tab with new ToolBar (AppCompat v7-21)
- Change Toolbar color in Appcompat 21
- Flinging with RecyclerView + AppBarLayout
- Creating a SearchView that looks like the material design guidelines
- failed to resolve com.android.support:appcompat-v7:22 and com.android.support:recyclerview-v7:21.1.2
- show icon in actionbar/toolbar with AppCompat-v7 21
- Material Design not styling alert dialogs
- Error in styles_base.xml file – android app – No resource found that matches the given name ‘android:Widget.Material.ActionButton’
- InflateException with FloatingActionButton from Official Design Library
- How to fix: “You need to use a Theme.AppCompat theme (or descendant) with this activity”
- How to implement the Material-design Elevation for Pre-lollipop
- java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1888, result=0, data=null} to activity
- Unable to write jarlist cache file while creating android project
- Android 5.0: how to change recent apps title color?
- VectorDrawableCompat Resources$NotFoundException on KitKat and below
- play-services-ads conflicts with appcompat
- How do I style appcompat-v7 Toolbar like Theme.AppCompat.Light.DarkActionBar?
- Android Api 23 Change Navigation View headerLayout textview
- Eclipse Upgrade Not Working
- NullPointer on toLowerCase but I don’t use that method anywhere
- Android Material Design Datepicker with AppCompat
- How to add a SearchWidget to the ActionBar?
- Getting exception : java.lang.NoClassDefFoundError: android.support.v7.app.AppCompatDelegateImplV14