4

well it gives me 9 style.xml error that says

Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar' Error No resource found that matches the given name: attr 'windowNoTitle'.

like that i am using visual studio with xamarin

    <?xml version="1.0" encoding="utf-8" ?>
<resources>

  <style name="Theme.Splash" parent="android:Theme">
    <item name="android:windowBackground">@drawable/splashscreen</item>
    <item name="android:windowNoTitle">true</item>
    <item name="android:windowActionBar">false</item>
  </style>

  <style name="MainTheme" parent="MainTheme.Base">
  </style>
  <!-- Base theme applied no matter what API -->
  <style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
    <!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
    <item name="windowNoTitle">true</item>
    <!--We will be using the toolbar so no need to show ActionBar-->
    <item name="windowActionBar">false</item>
    <!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
    <!-- colorPrimary is used for the default action bar background -->
    <item name="colorPrimary">#a84849</item>
    <!-- colorPrimaryDark is used for the status bar -->
    <item name="colorPrimaryDark">#444</item>
    <!-- colorAccent is used as the default value for colorControlActivated
         which is used to tint widgets -->
    <item name="colorAccent">#a84849</item>
    <!-- You can also set colorControlNormal, colorControlActivated
         colorControlHighlight and colorSwitchThumbNormal. -->
    <item name="windowActionModeOverlay">true</item>

    <!--<item name="datePickerDialogTheme">@style/AppCompatDialogStyle</item>-->
  </style>

  <style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
    <item name="colorAccent">#A84849</item>
  </style>
</resources>
Mayur Gangurde
  • 1,552
  • 12
  • 22
  • A little observation, you seem to be recursively inheriting your theme. 'MainTheme' is inheriting from 'MainTheme.Base' and 'MainTheme.Base' seems to be inheriting from 'MainTheme'. – Naveen Dissanayake Feb 13 '17 at 07:08

2 Answers2

2

Right on your solution > Clean. Then build again.

You can also close and reopen VS it helps with those weird 'no resource found' errors.

Also try adding 'android:windowNoTitle' instead of just 'windowNoTitle'

2

You may not reference android support v7 AppCompat library. It will shows the error as below.

enter image description here

Please add the support v7 AppCompat library form nuget :

enter image description here

You will build success: enter image description here

Mike Ma
  • 2,017
  • 1
  • 12
  • 17