<resources>
<!-- inherit from the material theme -->
<style name="AppTheme" parent="android:Theme.Material">
<!-- Main theme colors -->
<!-- your app branding color for the app bar -->
<item name="android:colorPrimary">@color/primary</item>
<!-- darker variant for the status bar and contextual app bars -->
<item name="android:colorPrimaryDark">@color/primary_dark</item>
<!-- theme UI controls like checkboxes and text fields -->
<item name="android:colorAccent">@color/accent</item>
</style>
</resources>
Please try to resolve the problem.
android:Theme.Material
requires API level 21 and so it's cleared that your minSDKVersion
is lower than 21.
If you really want to develop app for API 21 then declare android:minSDKVersion=21
.
And if in case you want to provide compatibility to lower version then you need to use support library, which is commonly known as AppCompat library.
You can access above attributes using AppCompat:
<item name=”colorPrimary”>@color/primary</item>
<item name=”colorPrimaryDark”>@color/primary_dark</item>
Actually, you can use this attribute, using the support library:
<style name="AppTheme" parent="@style/Theme.AppCompat.Light">
<item name="colorPrimary">...</item>
</style>
You can also use the others:
<item name="colorPrimaryDark">...</item>
<item name="colorAccent">...</item>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With