0

today i'm choose the Theme Material in the styles.xml but it says:

android:Theme.Material.NoActionBar requires API level 21 (current min is 8)

<style name="AppTheme" parent="android:Theme.Material.NoActionBar">

What can I do for fix this problem?
PS: I don't know but i don't have a package: values-v21

GSerg
  • 76,472
  • 17
  • 159
  • 346
Ayoub
  • 1
  • 3
  • Are you using eclipse or android studio – Pankaj Dec 19 '15 at 17:53
  • @Ayoub Please stop using [code snippets](https://blog.stackoverflow.com/2014/09/introducing-runnable-javascript-css-and-html-code-snippets/) for Java code. They are for [Javascript](http://stackoverflow.com/q/245062/11683). – GSerg Dec 20 '15 at 21:35

1 Answers1

2

Use Theme.AppCompat.NoActionBar instead of android:Theme.Material.NoActionBar. This is caused because of Android versions before 5.0 doesn't support Material Theme natively and AppCompat must be used if you are developing for Android versions below 5.0

TheElix
  • 36
  • 7