<commit_before>---
layout:     post
title:      "Fixing Xamarin.Android build errors"
subtitle:   "How to avoid or escape the NuGet cache hell that causes build errors when building Xamarin.Forms or Xamarin.Android apps"
date:       2016-10-29 12:00:00
author:     "<NAME>"
header-img: "img/nuget-hell-bg.jpg"
tags: [Xamarin, Android, Xamarin.Forms, AppCompat]
---

Today we had an awesome Xamarin Dev Day in Munich. Unfortunately a lot of people, especially people (and MVPs :P) that have installed Xamarin freshly, had problems building the sample apps. 

If you just installed Xamarin or updated the Xamarin.Forms NuGet package or one of the Xamarin.Android packages and run into one of the listed error messages, reading further will probably relief your pain. 

<h2 class="section-heading">Errors</h2>

We have seen a variety of build errors. Here are a couple of them.

{% highlight text %}
Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.3.0.0\content\libs/internal_impl-23.3.0.jar doesn't exist.	
Please install package: 'Xamarin.Android.Support.Vector.Drawable' available in SDK installer. Android resource directory ...\AppData\Local\Xamarin\Xamarin.Android.Support.Vector.Drawable\23.3.0.0\content\./ doesn't exist.
Please install package: 'Xamarin.Android.Support.v7.RecyclerView' available in SDK installer. Android resource directory ...\AppData\Local\Xamarin\Xamarin.Android.Support.v7.RecyclerView\23.3.0.0\content\./ doesn't 
Please install package: 'Xamarin.Android.Support.Vector.Drawable' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.Vector.Drawable\23.3.0.0\content\classes.jar doesn't
Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Android resource directory ...\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.3.0.0\content\./ doesn't exist.	
Please install package: 'Xamarin.Android.Support.Design' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.Design\23.3.0.0\content\classes.jar doesn't exist.	
Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.v7.MediaRouter\23.3.0.0\content\classes.jar doesn't exist.
Please install package: 'Xamarin.Android.Support.Animated.Vector.Drawable' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.Animated.Vector.Drawable\23.3.0.0\content\classes.jar doesn't exist.	
Reason: File ...\AppData\Local\Xamarin\zips\2A3A8A6D6826EF6CC653030E7D695C41.zip is not a ZIP archive	
Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. Android resource directory ...\AppData\Local\Xamarin\Xamarin.Android.Support.v7.MediaRouter\23.3.0.0\content\./ doesn't exist.	
Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip and extract it to the ...\AppData\Local\Xamarin\Xamarin.Android.Support.Animated.Vector.Drawable\23.3.0.0\content directory.
Please install package: 'Xamarin.Android.Support.v7.CardView' available in SDK installer. Android resource directory ...\AppData\Local\Xamarin\Xamarin.Android.Support.v7.CardView\23.3.0.0\content\./ doesn't exist.
Please install package: 'Xamarin.Android.Support.v7.CardView' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.v7.CardView\23.3.0.0\content\classes.jar doesn't exist.
Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.3.0.0\content\classes.jar doesn't exist.	
Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.v7.MediaRouter\23.3.0.0\content\libs/internal_impl-23.3.0.jar doesn't exist.	
Please install package: 'Xamarin.Android.Support.v7.AppCompat' available in SDK installer. Android resource directory ...\AppData\Local\Xamarin\Xamarin.Android.Support.v7.AppCompat\23.3.0.0\content\./ doesn't exist.
Please install package: 'Xamarin.Android.Support.Animated.Vector.Drawable' available in SDK installer. Android resource directory ...\AppData\Local\Xamarin\Xamarin.Android.Support.Animated.Vector.Drawable\23.3.0.0\content\./ doesn't exist.<commit_msg>kwl typo fixes<commit_after>---
layout:     post
title:      "Fixing Xamarin.Android build errors"
subtitle:   "How to avoid or escape the NuGet cache hell that causes build errors when building Xamarin.Forms or Xamarin.Android apps"
date:       2016-10-29 12:00:00
author:     "Sven-<NAME>"
header-img: "img/nuget-hell-bg.jpg"
tags: [Xamarin, Android, Xamarin.Forms, AppCompat]
---

Today we had an awesome Xamarin Dev Day in Munich. Unfortunately a lot of people, especially people (and MVPs :P) that have installed Xamarin freshly, had problems building the sample apps. 

If you just installed Xamarin or updated the Xamarin.Forms NuGet package or one of the Xamarin.Android packages and run into one of the listed error messages, reading further will probably relieve your pain. 

<h2 class="section-heading">Errors</h2>

We saw a variety of build errors. Here are a couple of them.

{% highlight text %}
Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.3.0.0\content\libs/internal_impl-23.3.0.jar doesn't exist.	
Please install package: 'Xamarin.Android.Support.Vector.Drawable' available in SDK installer. Android resource directory ...\AppData\Local\Xamarin\Xamarin.Android.Support.Vector.Drawable\23.3.0.0\content\./ doesn't exist.
Please install package: 'Xamarin.Android.Support.v7.RecyclerView' available in SDK installer. Android resource directory ...\AppData\Local\Xamarin\Xamarin.Android.Support.v7.RecyclerView\23.3.0.0\content\./ doesn't 
Please install package: 'Xamarin.Android.Support.Vector.Drawable' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.Vector.Drawable\23.3.0.0\content\classes.jar doesn't
Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Android resource directory ...\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.3.0.0\content\./ doesn't exist.	
Please install package: 'Xamarin.Android.Support.Design' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.Design\23.3.0.0\content\classes.jar doesn't exist.	
Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.v7.MediaRouter\23.3.0.0\content\classes.jar doesn't exist.
Please install package: 'Xamarin.Android.Support.Animated.Vector.Drawable' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.Animated.Vector.Drawable\23.3.0.0\content\classes.jar doesn't exist.	
Reason: File ...\AppData\Local\Xamarin\zips\2A3A8A6D6826EF6CC653030E7D695C41.zip is not a ZIP archive	
Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. Android resource directory ...\AppData\Local\Xamarin\Xamarin.Android.Support.v7.MediaRouter\23.3.0.0\content\./ doesn't exist.	
Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip and extract it to the ...\AppData\Local\Xamarin\Xamarin.Android.Support.Animated.Vector.Drawable\23.3.0.0\content directory.
Please install package: 'Xamarin.Android.Support.v7.CardView' available in SDK installer. Android resource directory ...\AppData\Local\Xamarin\Xamarin.Android.Support.v7.CardView\23.3.0.0\content\./ doesn't exist.
Please install package: 'Xamarin.Android.Support.v7.CardView' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.v7.CardView\23.3.0.0\content\classes.jar doesn't exist.
Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.3.0.0\content\classes.jar doesn't exist.	
Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. Java library file ...\AppData\Local\Xamarin\Xamarin.Android.Support.v7.MediaRouter\23.3.0.0\content\libs/internal_impl-23.3.0.jar doesn't exist.	
Please install package: 'Xamarin.Android.Support.v7.AppCompat' available in SDK installer. Android resource directory ...\AppData\Local\Xamarin\Xamarin.Android.Support.v7.AppCompat\23.3.0.0\content\./ doesn't exist.
Please install package: 'Xamarin.Android.Support.Animated.Vector.Drawable' available in SDK installer. Android resource directory ...\AppData\Local\Xamarin\Xamarin.Android.Support.Animated.Vector.Drawable\23.3.0.0\content\./ doesn't exist.
{'fraction_non_alphanumeric': 0.11922949186316838, 'fraction_numerical': 0.03276873685375844, 'mean_word_length': 4.491793313069909, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 32, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '128298', 'n_tokens_mistral': 2799, 'n_tokens_neox': 2847, 'n_words': 700}