0

I'm trying to use action bar in android 2.3.3 .i use this link to add support library in intellij . it does not have any compile error but after running it does not recognize any parent theme. for example this is one of

D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml
Error:(62, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:62: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'.
Error:(20, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material'.
Error:(22, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:22: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display4'.
Error:(24, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:24: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display3'.
Error:(26, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:26: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display2'.
Error:(28, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:28: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Display1'.
Error:(30, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:30: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Headline'.
Error:(32, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:32: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Title'.
Error:(34, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:34: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Subhead'.
Error:(36, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:36: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body2'.
Error:(38, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:38: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Body1'.
Error:(40, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:40: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Caption'.
Error:(42, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:42: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Menu'.
Error:(60, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:60: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Button'.
Error:(46, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:46: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Inverse'.
Error:(48, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:48: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large'.
Error:(50, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:50: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Large.Inverse'.
Error:(52, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:52: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium'.
Error:(54, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:54: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Medium.Inverse'.
Error:(56, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:56: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small'.
Error:(58, -1) android-apt-compiler: [appcompat] D:\freetime\codes\appcompat\res\values-v21\styles_base_text.xml:58: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Small.Inverse'.

I'm so confused and i have this problem for a long time and can not solve it. what should i do?

MSepehr
  • 890
  • 2
  • 13
  • 36

1 Answers1

0

Set your Project Build target to API level 21. Then rebuild your project.

Emil
  • 2,786
  • 20
  • 24
  • I want to execute my app in android before 2.3.3 .does changing build target ignore this compatibility? – MSepehr Jun 24 '15 at 04:29
  • Do you have latest build target? – Emil Jun 24 '15 at 04:29
  • sorry i'm new in android!is build target the same as Project language level in project structure? – MSepehr Jun 24 '15 at 04:32
  • To support values-v21, Your Build Target should be 5.0. Go to File -> "Project Structure" Under Platform Settings -> SDKs you can see android sdk path, classpath and build target. Update your sdk first with latest build target using sdk manager. – Emil Jun 24 '15 at 04:34
  • ok,i checked it. i have the last version of sdk and i do what you said.but still it has the same errors – MSepehr Jun 24 '15 at 04:40
  • post your settings in build.gradle file – Emil Jun 24 '15 at 04:50
  • i do not have this file in my project – MSepehr Jun 24 '15 at 04:54
  • And check these answers. [link1](http://stackoverflow.com/questions/26431676/appcompat-v721-0-0-no-resource-found-that-matches-the-given-name-attr-andro). and [link1](http://stackoverflow.com/questions/26457096/appcompat-v7-r21-returning-error-in-values-xml) – Emil Jun 24 '15 at 04:58
  • i did what they said and it work fine but the main problem still does not solve.i want to run my app in device with android 2.3.3 . in these devices the action bar does not shown – MSepehr Jun 24 '15 at 05:54