0

when i run my application it caused the AppCompat does not support the current theme features

It is not duplicated because my implementation already like what on described on duplicated answer

my styles is:

 <resources>

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

    </style>

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

</resources>

and for values-21 is:

<resources>

<style name="AppTheme" parent="MyMaterialTheme.Base">
    <item name="android:windowContentTransitions">true</item>
    <item name="android:windowAllowEnterTransitionOverlap">true</item>
    <item name="android:windowAllowReturnTransitionOverlap">true</item>
    <item name="android:windowSharedElementEnterTransition">@android:transition/move</item>
    <item name="android:windowSharedElementExitTransition">@android:transition/move</item>
</style>

and my simple activity is:

public class MainActivity extends AppCompatActivity {
private Toolbar mToolbar;
@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    mToolbar = (Toolbar) findViewById(R.id.toolbar);
    setSupportActionBar(mToolbar);
}
}

what is the problem? how can i solve it?

My android sdk tools is:24.2 platform-tools=22 build-tools=22

Mostafa Jamareh
  • 1,389
  • 4
  • 22
  • 54
  • @CommonsWare, it is not duplicated- because already my styles has action bar false and no title true – Mostafa Jamareh Jun 17 '15 at 12:07
  • 1
    Try doing **exactly** what is in Chris Banes' answer (which, among other things, does not have the theme with those window attributes inheriting from `Theme.AppCompat.Light.DarkActionBar`, which seems singularly pointless anyway). Once you have things working with the official recipe, then start trying to migrate things to more of what you want. At the point in time when the problem recurs, if you not know why it recurs, post a new SO question, where you show how you started with Chris Banes' answer and where you ran into problems. – CommonsWare Jun 17 '15 at 12:13

0 Answers0