PKV
PKV

Reputation: 783

Not able to build my first Default Xamarin Form android project in Visual Studio 2015

I am new to mobile development. The error I am getting in xamarin but I have a feeling this is not specific to xamarin but related to android sdk

I tried to set this up in Visual Studio 2015. I followed all the steps on xamarin website. Can someone help me in finding and fixing this issue.

Trying to Create a Xamarin Form portable app. And getting errors in Droid project.

  1. Nothing modifying and building with defaults gives me:

Error       Error retrieving parent for item: No resource found that matches the given name 'Platform.V11.AppCompat'.   App2.Droid  \App2.Droid\obj\Debug\resourcecache\B237B8541B965BBE5CA1DD64CF2395A7\res\values-v14\values-v14.xml  15  
Error       Error retrieving parent for item: No resource found that matches the given name 'Platform.V11.AppCompat.Light'. App2.Droid  \App2.Droid\obj\Debug\resourcecache\B237B8541B965BBE5CA1DD64CF2395A7\res\values-v14\values-v14.xml  21  
Error       Error retrieving parent for item: No resource found that matches the given name 'Base.V11.Theme.AppCompat.Dialog'.  App2.Droid  \App2.Droid\obj\Debug\resourcecache\B237B8541B965BBE5CA1DD64CF2395A7\res\values-v21\values-v21.xml  131 
Error       Error retrieving parent for item: No resource found that matches the given name 'Base.V11.Theme.AppCompat.Light.Dialog'.    App2.Droid  \App2.Droid\obj\Debug\resourcecache\B237B8541B965BBE5CA1DD64CF2395A7\res\values-v21\values-v21.xml  182 
Error       Error retrieving parent for item: No resource found that matches the given name 'Base.V22.Theme.AppCompat'. App2.Droid  \App2.Droid\obj\Debug\resourcecache\B237B8541B965BBE5CA1DD64CF2395A7\res\values-v23\values-v23.xml  11  
Error       Error retrieving parent for item: No resource found that matches the given name 'Base.V22.Theme.AppCompat.Light'.   App2.Droid  \App2.Droid\obj\Debug\resourcecache\B237B8541B965BBE5CA1DD64CF2395A7\res\values-v23\values-v23.xml  17  

========================================================================

  1. Changing "Compile Using Android Version" to Android5.0 gives me:

Error       Error retrieving parent for item: No resource found that matches the given name 'Platform.V11.AppCompat'.   App2.Droid  \App2.Droid\obj\Debug\resourcecache\B237B8541B965BBE5CA1DD64CF2395A7\res\values-v14\values-v14.xml  15  
Error       Error retrieving parent for item: No resource found that matches the given name 'Platform.V11.AppCompat.Light'. App2.Droid  \App2.Droid\obj\Debug\resourcecache\B237B8541B965BBE5CA1DD64CF2395A7\res\values-v14\values-v14.xml  21  
Error       Error retrieving parent for item: No resource found that matches the given name 'Base.V11.Theme.AppCompat.Dialog'.  App2.Droid  \App2.Droid\obj\Debug\resourcecache\B237B8541B965BBE5CA1DD64CF2395A7\res\values-v21\values-v21.xml  131 
Error       Error retrieving parent for item: No resource found that matches the given name 'Base.V11.Theme.AppCompat.Light.Dialog'.    App2.Droid  \App2.Droid\obj\Debug\resourcecache\B237B8541B965BBE5CA1DD64CF2395A7\res\values-v21\values-v21.xml  182

My default package.config looks like:

  <package id="Xamarin.Android.Support.Design" version="23.0.1.3" targetFramework="monoandroid60" />
  <package id="Xamarin.Android.Support.v4" version="23.0.1.3" targetFramework="monoandroid60" />
  <package id="Xamarin.Android.Support.v7.AppCompat" version="23.0.1.3" targetFramework="monoandroid60" />
  <package id="Xamarin.Android.Support.v7.CardView" version="23.0.1.3" targetFramework="monoandroid60" />
  <package id="Xamarin.Android.Support.v7.MediaRouter" version="23.0.1.3" targetFramework="monoandroid60" />
  <package id="Xamarin.Forms" version="2.0.0.6482" targetFramework="monoandroid60" />

Updated to latest stable Xamarin.Forms 2.1.0.6529 gives me same errors.

My SDK Manager looks like this:

enter image description here

enter image description here

Upvotes: 2

Views: 2614

Answers (1)

taoffi
taoffi

Reputation: 13

You may find an answer here: https://forums.xamarin.com/discussion/46840/error-retrieving-parent-for-item-no-resource-found-that-matches-given-name

You are correct, that seems related to droid sdk. Excerpt from the mentioned page: "Fixed it. Turns out enough uninstalling and reinstalling of components and SDKs fixed it. (was a corrupt AppCompat V7 file)"

Upvotes: 1

Related Questions