You need to use a Theme.AppCompat theme (or descendant) with this activity error onShow 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.

<activity android:name=".MainActivity"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >

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" >

Tags:

Java Example