1

Whenever i run the code as an application in my Eclipse it shows an error:

\workspace\appcompat_v7\res\values-v21\themes_base.xml:150: error: Error: No resource found that matches the given name: attr 'android:windowElevation'.

But the example files runs. How to rectify it?

hrskrs
  • 4,447
  • 5
  • 38
  • 52
Arun Prakash
  • 57
  • 1
  • 11

3 Answers3

0

First check your minApi:

Notice that android:windowElevation works for API > 20

If your API is right:

make sure you have installed Android 5.0 SDK via the SDK-Manager

For pre-lollipop devices check this

Community
  • 1
  • 1
hrskrs
  • 4,447
  • 5
  • 38
  • 52
0

Make sure your appcompat_v7 targeting Android 5.0 or later.

Octaviano Putra
  • 624
  • 4
  • 9
0

change this line in your style.xml file

<style name="AppBaseTheme" parent="Theme.AppCompat.Light">

to :

<style name="AppBaseTheme" parent="android:Theme.Light">
settaratici
  • 310
  • 1
  • 7
  • 18