0

LOG_CAT :

Caused by: java.lang.IllegalArgumentException: AppCompat does not support the current theme features: { windowActionBar: false, windowActionBarOverlay: false, android:windowIsFloating: false, windowActionModeOverlay: false, windowNoTitle: false }
        at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:371)
        at android.support.v7.app.AppCompatDelegateImplV7.initWindowDecorActionBar(AppCompatDelegateImplV7.java:173)
        at android.support.v7.app.AppCompatDelegateImplBase.getSupportActionBar(AppCompatDelegateImplBase.java:87)
        at android.support.v7.app.AppCompatDelegateImplV7.setSupportActionBar(AppCompatDelegateImplV7.java:197)
        at android.support.v7.app.AppCompatActivity.setSupportActionBar(AppCompatActivity.java:99)
        at de.memorian.playpal.MainActivity.afterInject(MainActivity.java:72)
Pragnesh Ghoda シ
  • 8,318
  • 3
  • 25
  • 40

3 Answers3

1

if your using AppCompatActivity try extending Activity instead of AppCompatActivity

public class ActivityName extends Activity 

then change the theme in values/styles.xml file:

<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">

to

<style name="AppTheme" parent="android:Theme.Material">

these should be compatible together.

but it requires min API level 21. I hope this helps.

Nouran S. Ahmad
  • 503
  • 1
  • 5
  • 19
0

check your styles.xml like below

<style name="MyMaterialTheme" parent="MyMaterialTheme.Base">

</style>

<style name="MyMaterialTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="windowActionBar">false</item>
    <item name="android:windowNoTitle">true</item>

    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
</style>

0

I got the same problem as well and after a couple of hour of study i came up with this sollution

Before i had this this

<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
    <item name="android:textColorPrimary">@color/colorTextPrimary</item>
    <item name="android:textColorSecondary">@color/colorTextSecondary</item>
</style>

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

According to the documentation they are doing many changes in the new release hence they made strict on later version in appcompat. I change the the parent theme and it works fine , use the below code.

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
    <item name="android:textColorPrimary">@color/colorTextPrimary</item>
    <item name="android:textColorSecondary">@color/colorTextSecondary</item>
</style>

<style name="AppTheme.FullScreen">
    <item name="windowActionBar">false</item>
    <item name="windowNoTitle">true</item>
</style>

thanks

yubaraj poudel
  • 3,821
  • 1
  • 31
  • 28