Andrés Talavera Andrés Talavera - 1 month ago 188
Android Question

Xamarin : No resource found that matches the given names (AppCompat)

I deployed a virtual machine on Azure. I've installed Visual Studio 2015, Xamarin and other mobile development tools.
I did the same setup on my local computer to test my apps on my devices from Visual Studio

The only difference is the installation of the Android SDK. On my local machine, I have no image system.

Android DSK Manager

I developed an application on my virtual machine. I have no error during compilation.
I uses Android.Support.Design, Android.Support.V4, Android.Support.V7.AppCompat, Android.Support.V7.RecyclerView (latest releases from NuGet) and their MvvmCross implementation.

My Azure Virtual Machine

I wanted to continue the development of the application on my local computer. NuGet the packages are properly restored.

When I build app, I have some errors :

My Local Machine

Error Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.AppCompat.Button'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'buttonStyle'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'colorAccent'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'colorPrimary'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'colorPrimaryDark'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'windowActionBar'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'windowNoTitle'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'windowNoTitle'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml


I tried


  • to change 'Theme.AppCompat.Light.DarkActionBar' by '@android:styles/Theme.AppCompat.Light.DarkActionBar' and some others (android/styles)

  • to change
    target=android-19
    to
    target=android-21
    in
    C:\Program Files (x86)\Android\android-sdk\extras\android\support\v7\appcompat\project.properties



Could someone explain to me what's the problem? I dropped. Same OS, same tools, same SDK, same JDK,

Answer

I got the same problem with Xamarin Studio on Mac. What I did to solve the problem is updating the NuGet Package Xamarin.Android.Support.v7.AppCompat. I think you can use the same approach to fix your issue on Visual Studio, too.

Take a look
enter image description here