Q:

Getting ClassCast Exception on API 19 but working fine on API 21

I have implemented a material design navigation drawer and a custom toolbar. It works perfectly fine on Lollipop device. 
But when run on Android 4.4.4, it crashes with error mentioned below :

java.lang.ClassCastException: android.view.ViewGroup$LayoutParams
  cannot be cast to android.widget.AbsListView$LayoutParams

I have not changed any layout of navigation drawer. Code sample to set up drawer :
mNavigationDrawerFragment = (NavigationDrawerFragment) getSupportFragmentManager()
                .findFragmentById(R.id.fragment_drawer);

        // Set up the drawer.
        mNavigationDrawerFragment.setup(R.id.fragment_drawer,
                (DrawerLayout) findViewById(R.id.drawer), mToolbar);

LogCat :
 java.lang.ClassCastException: android.view.ViewGroup$LayoutParams cannot be cast to android.widget.AbsListView$LayoutParams
            at android.widget.ListView.setupChild(ListView.java:1826)
            at android.widget.ListView.makeAndAddView(ListView.java:1793)
            at android.widget.ListView.fillDown(ListView.java:691)
            at android.widget.ListView.fillFromTop(ListView.java:752)
            at android.widget.ListView.layoutChildren(ListView.java:1630)
            at android.widget.AbsListView.onLayout(AbsListView.java:2087)
            at android.view.View.layout(View.java:14857)
            at android.view.ViewGroup.layout(ViewGroup.java:4643)
            at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
            at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
            at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
            at android.view.View.layout(View.java:14857)
            at android.view.ViewGroup.layout(ViewGroup.java:4643)
            at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
            at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
            at android.view.View.layout(View.java:14857)
            at android.view.ViewGroup.layout(ViewGroup.java:4643)
            at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:907)
            at android.view.View.layout(View.java:14857)
            at android.view.ViewGroup.layout(ViewGroup.java:4643)
            at android.widget.RelativeLayout.onLayout(RelativeLayout.java:1055)
            at android.view.View.layout(View.java:14857)
            at android.view.ViewGroup.layout(ViewGroup.java:4643)
            at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
            at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
            at android.view.View.layout(View.java:14857)
            at android.view.ViewGroup.layout(ViewGroup.java:4643)
            at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
            at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
            at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
            at android.view.View.layout(View.java:14857)
            at android.view.ViewGroup.layout(ViewGroup.java:4643)
            at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
            at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
            at android.view.View.layout(View.java:14857)
            at android.view.ViewGroup.layout(ViewGroup.java:4643)
            at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1671)
            at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1525)
            at android.widget.LinearLayout.onLayout(LinearLayout.java:1434)
            at android.view.View.layout(View.java:14857)
            at android.view.ViewGroup.layout(ViewGroup.java:4643)
            at android.widget.FrameLayout.layoutChildren(FrameLayout.java:453)
            at android.widget.FrameLayout.onLayout(FrameLayout.java:388)
            at android.view.View.layout(View.java:14857)
            at android.view.ViewGroup.layout(ViewGroup.java:4643)
            at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2013)
            at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1770)
            at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1019)
            at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5725)
            at android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
            at android.view.Choreographer.doCallbacks(Choreographer.java:574)
            at android.view.Choreographer.doFrame(Choreographer.java:544)
            at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
            at android.os.Handler.handleCallback(Handler.java:733)
            at android.os.Handler.dispatchMessage(Handler.java:95)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5086)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)

Any help is appreciated.

A:

Android has made major changes in AppCompat v21.
So, please refer to this link:
http://android-developers.blogspot.in/2015/04/android-support-library-221.html

