Check out example codes for "how to solve Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.". It will help you in understanding the concepts better.

Code Example 1

<style name="AppFullScreenTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowActionBar">false</item>
    <item name="android:windowFullscreen">true</item>
    <item name="android:windowContentOverlay">@null</item>
</style>

Code Example 2

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

Code Example 3

<activity android:name=".MainActivity"
    android:theme="@style/AppFullScreenTheme" >

Code Example 4

<application
    android:theme="@style/AppTheme">

Learn ReactJs, React Native from akashmittal.com