How to fix the DrawerLayout inflation error in Android

If you are trying to use the DrawerLayout in your Android app(perhaps from the example project?), and your app is crashing when you try to run it, and you are getting a lot of errors saying Caused by: android.view.InflateException: Binary XML file line #1: Error inflating class android.support.v4.widget.DrawerLayout or something like: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.android.navigationdrawerexample/com.example.android.navigationdrawerexample.MainActivity}: android.view.InflateException: Binary XML

» Read more