0

I have started working on android recently and i have been looking at my colleagues code for an app to learn more.

I have come across this file which also has an error.

can you tell me what it is and what it does

<resources>

<!--
    Base application theme, dependent on API level. This theme is replaced
    by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
    <!--
        Theme customizations available in newer API levels can go in
        res/values-vXX/styles.xml, while customizations related to
        backward-compatibility can go here.
    -->
</style>

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
    <!-- All customizations that are NOT specific to a particular API-level can go     here. -->
</style>

</resources>

error is in line 7 error retrieving parent for item, no resource found that matches the given name "Theme.AppCompat.Light"

  • Do you have this line on your styles file? `` if not please add it – Carlos J May 23 '14 at 17:46
  • Add the android-support-v7-appcompat project from your samples to your WorkSpace. Then add a reference to it in your project. You'll also have to add the support-v4 library to your libs folder and add it to your Build Path. – Phantômaxx May 23 '14 at 17:48

2 Answers2

0

Check whether you downloaded and installed Support Library. Here is the link. Hope this might be the problem you are facing.

Support library

Shadow
  • 6,864
  • 6
  • 44
  • 93
0

This is Theme file you are using.
And the problem is library may not be imported in your project so,
Do following steps Go to

1.File->Import (android-sdk\extras\android\support\v7). Choose"appcompat"
2.Project-> properties->Android. In the section library "Add" and choose "appCompat"
Or if problem not solved yet,you may refer this post
No resource found that matches the given name '@style/Theme.AppCompat.Light'

Community
  • 1
  • 1
Giru Bhai
  • 14,370
  • 5
  • 46
  • 74