AppCompat v21.+’s Theme.AppCompat extends Theme.Base.AppCompat which extends Theme.Platform.AppCompat which extends android:Theme.Material on 21+ devices (i.e. Android 5.0 Lollipop) so you only need to extend Theme.AppCompat to use Material theme if you are using the AppCompat v21 (or above) library.

First add compile ‘com.android.support:appcompat-v7:21.0.0’ to the dependancies section of your build.gradle file.

Edit your styles.xml to add the style AppTheme.Base and have AppTheme extend AppTheme.Base. For example:

You don’t have to call it AppTheme.Base. You can call it whatever you want. You’ll need to change @color/colorPrimary, @color/colorPrimaryDark and @color/colorAccent to your own colour preferences in your colors.xml file.

There’s a great Github Gist of Material Design Colours at https://gist.github.com/cypressious/90355ac3e92c65908441

Next create a values-21 folder in the res folder if you don’t already have one. Then create or edit styles.xml in your res/values-v21 folder. AppTheme should extend AppTheme.Base instead of android:Theme.Material.Light. For example:

If you extend android:Theme.Material.Light instead of AppTheme.Base then you’ll get an “IllegalStateException:You need to use a Theme.AppCompat theme (or descendant) with this activity” error.

Now you just need to set the theme as AppTheme in the AndroidManifest.xml