No resource found that mach the given name Theme.AppCompat.Light.NoActionBar

Bikash picture Bikash · Oct 12, 2015 · Viewed 12.6k times · Source

I am adding some items in Styles.xml files. However, it is giving me an error.

Here is my code.

<?xml version="1.0" encoding="UTF-8" ?>
<resources>
    <style name="MyTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">#2196F3</item>
        <item name="drawerArrowStyle">@style/MyDrawerArrowStyle</item>
    </style>
    <style name="MyDrawerArrowStyle"   parent="Widget.AppCompat.DrawerArrowToggle">
        <item name="color">#F5F5F5</item>
        <item name="spinBars">true</item>
    </style>
</resources>

Error can be seen in the screenshot below

error screenshot

  1. Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.NoActionBar'.
  2. No resource found that matches the given name: attr 'colorPrimary'.
  3. No resource found that matches the given name: attr 'drawerArrowStyle'. 4..No resource found that matches the given name 'Widget.AppCompat.DrawerArrowToggle'.
  4. No resource found that matches the given name: attr 'color'.
  5. No resource found that matches the given name: attr 'spinBars'.

Answer

Bikash picture Bikash · Oct 13, 2015

I found my solution by adding AppCompact v7 in the Package of my xamarin studio android project.

Link= https://components.xamarin.com/view/xamandroidsupportv7appcompat