AppCompat does not support the current theme

后端 未结 2 1199
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-11 23:29

My app is running fine on Android N, but is crashing at setContentView(R.layout.activity_main) on Android M:

 Caused by: java.lang.IllegalArgume         


        
相关标签:
2条回答
  • 2020-12-11 23:56

    Getting same problem so I have update my style like this and its worked.

    <style name="AppTheme.AppCompat.Light.NoActionBar.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>
    
    0 讨论(0)
  • 2020-12-12 00:19

    Changing the parent theme worked for me

    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
            <item name="colorPrimary">@color/colorPrimary</item>
            <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
            <item name="colorAccent">@color/colorAccent</item>
    </style>
    
    0 讨论(0)
提交回复
热议问题