you need to use a theme.appcompat theme (or descendant) with this activity. android code example
Example 1: how to solve Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
<application
android:theme="@style/AppTheme">
Example 2: how to solve Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
<activity android:name=".MainActivity"
android:theme="@style/AppFullScreenTheme" >