Search code examples
androidstylesandroid-5.0-lollipopandroid-theme

I want to use the android L theme


hello :) I want to change my app so it will have the Material theme, so .. I installed the new adt, updated all on sdk manager, and did this stuff:

I opened a new file - /res/values/styles.xml and used there this code:

    <?xml version="1.0" encoding="utf-8"?>
<resources>
  <!-- your app's theme inherits from the Material theme -->
  <style name="AppTheme" parent="android:Theme.Material">
    <!-- theme customizations -->
  </style>
</resources>

And at the AndroidManifest I used this code:

        <uses-sdk
    android:minSdkVersion="19"
    android:targetSdkVersion="20" />

at the styles.xml I get this error:

"error: Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material'."

what do I need to change?


Solution

  • Please try following

    1. Go to project->properties->Android
    2. Check build target should be L (In case you are not seeing L in build target, please download it via SDK Manager)
      1. In your manifest.xml file please mentioned the minimumtarget sdk value as L.

    It will solve your problem.enter image description here