1

I am using AppCompatActivity

public class SplashActivity extends AppCompatActivity

This is my theme

    <!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat">
    <!-- Customize your theme here. -->
    <item name="android:windowNoTitle">true</item>
    <item name="windowActionBar">false</item>

</style>

It is throwing the exception

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vfi/com.vfi.SplashActivity}: java.lang.IllegalArgumentException: AppCompat does not support the current theme features
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2237)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2286)
        at android.app.ActivityThread.access$800(ActivityThread.java:145)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1243)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5127)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:515)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641)
        at dalvik.system.NativeStart.main(Native Method)
 Caused by: java.lang.IllegalArgumentException: AppCompat does not support the current theme features
        at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:363)
        at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:246)
        at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:106)
        at com.vfi.SplashActivity.onCreate(SplashActivity.java:17)
        at android.app.Activity.performCreate(Activity.java:5231)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2201)

            

How do I solve this?             

Rishi Paul
  • 936
  • 2
  • 8
  • 25
WISHY
  • 11,067
  • 25
  • 105
  • 197

2 Answers2

0

Try this.

   <style name="Theme.AppCompat.Light.NoActionBar" parent="@style/Theme.AppCompat.Light">
    <item name="android:windowNoTitle">true</item>
    <item name="windowActionBar">false</item>
   </style>
Nitesh
  • 3,868
  • 1
  • 20
  • 26
0

Try Like This Then

  <style name="AppBaseTheme" parent="Theme.AppCompat.Light">


</style>

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
    <!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
Rishi Paul
  • 936
  • 2
  • 8
  • 25