How to Use Material Design in Android App?-ThrowExceptions

Exception or error:

I’ve gone to the Android Developer documentation to see how I can use material design, here:

and here:

Essentially, I would like for someone to summarize how to set up/use material design, because I feel like there is a lot of information on the developer docs, and I can’t seem to wrap my mind around it.
If you’d rather give me a link to a guide created by someone else, that’d be helpful as well.

I’m also using API level 19 (target SDK version 19) and from what I can see, I’ll need to use

I’m also using Android Studio, and not eclipse.

EDIT: I would like to be able to use material design for devices that are not running Android 5.0 Lollipop, because according to the Android distribution data, there are less than 0.1% of devices running Lollipop: Android Distribution Data

How to solve:

Install SDK platform of Android 5.0 SDK then update your Support Library and Support Repository to the latest version via the SDK-Manager.

Take a look at this link for creating material app

With support libraries, you can provide similar behaviour on older devices like:

  • Using the Material Theme
  • Subset of UI widgets like
    • EditText
    • Spinner
    • RadioButton

Also take a look at android design support library.

More information :

But for using some concepts like FloatingActionButton in your application you can use this library :

More libraries available here


Use following style with appcompat_v7 support library:


    android:theme="@style/MyMaterialTheme" >


<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="android:windowNoTitle">true</item>
    <item name="windowActionBar">false</item>
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
    <item name="windowNoTitle">true</item>

Here is my demo project for Material Design below 5.0 with Toolbar and Recycler view:

Leave a Reply

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