Do not request Window.FEATURE_SUPPORT_ACTION_BAR

 

java.lang.RuntimeException: Unable to start activity ComponentInfo{chrisrenke.drawerarrowdrawable/chrisrenke.drawerarrowdrawable.DrawerArrowSample}: java.lang.IllegalStateException: This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.


<item name="windowActionBar">false</item>

代替

<item name="android:windowActionBar">false</item>
<style name="AppTheme" parent="AppTheme.Base" />
<style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
    <item name="colorPrimary">@color/primary</item>
    <item name="colorPrimaryDark">@color/primaryDarker</item>
    <item name="android:windowNoTitle">true</item>
    <item name="windowActionBar">false</item>
    <item name="drawerArrowStyle">@style/DrawerArrowStyle</item></style><style name="DrawerArrowStyle" parent="Widget.AppCompat.DrawerArrowToggle">
    <item name="spinBars">true</item>
    <item name="color">@android:color/white</item>
    </style>
      
    <color name="primary">#457C50</color>
    <color name="primaryDarker">#580C0C</color>

   


你可能感兴趣的:(Do not request Window.FEATURE_SUPPORT_ACTION_BAR)