I am trying to change the color of my action bar in android studio. I have already changed the minSDKVersion to 21 so I know that is not the problem. Yet I keep getting the erro
Use android:colorPrimary
. colorPrimary
on its own will only work if you are inheriting from Theme.AppCompat
.
So, for example, in this sample project, I have:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Apptheme" parent="android:Theme.Material">
<item name="android:colorPrimary">@color/primary</item>
<item name="android:colorPrimaryDark">@color/primary_dark</item>
<item name="android:colorAccent">@color/accent</item>
</style>
</resources>