5
votes

I created a new project by selecting the default theme as Appcompat.Light, then when I run the app, I'm getting this error:

"Error XA5209: Unzipping failed. Please download dl-ssl.google.com/android/… and extract it to the /Users/username/.local/share/Xamarin/Xamarin.Android.Support.Vector.Drawable/23.3.0.0/content directory. (XA5209)."

I haven't done anything else other than create a new project, Why am i getting this error?

2
Remove the component android.support.v7 and and add this nuget: nuget.org/packages/Xamarin.Android.Support.v7.AppCompat - jzeferino
@jzeferino sorry, didn't work - Drunken Daddy
Are you getting the same error? - jzeferino
when you said that you I added the references Xamarin.Android.Support.v4.dll and Xamarin.Android.Support.v7.AppCompat how did you do that? did you just add the nugget or did you manually add .dll? If you can please share code on github. - jzeferino
I tried both, via nuget and manual add. both didn't work, can't reference v7.toolbar in .axml file - Drunken Daddy

2 Answers

10
votes

The process of downloading the Android.Support.V7 or other nuget could take some time.

If in the middle of the process for some reason you quit the Xamarin Studio/Visual Studio or your internet goes down the packages being download as .zip will be corrupt.

After you try to open it again you will see that message "Error XA5209: Unzipping failed. Please download dl-ssl.google.com/android/… and extract it to the /Users/username/.local/share/Xamarin/Xamarin.Android.Support.Vector.Drawable/23.3.0.0/content directory. (XA5209)."

The solution that I follow most of the times this happens is to delete the root folder of the package where the error come from (/Users/username/.local/share/Xamarin.Android.Support.Vector.Drawable) and all the .zips inside the folder /Users/username/.local/share/zips.

Click here for more Resolving Library Installation Errors

2
votes

The accepted answer did not work for me, so here is what I did to make it work. Basically the solution recommended here: https://docs.microsoft.com/en-us/xamarin/android/troubleshooting/resolving-library-installation-errors. I am developing on Windows 10, with Visual Studio 2017 Community. The Packages are located in ..user/AppData/Local/Xamarin/....

I got errors for every package I needed, meaning Xamarin.Android.Support.Animated.Vector.Drawable, Xamarin.Android.Support.v4, Xamarin.Android.Support.Vector.Drawable and about 4 more... So I did the following (solution applies to every package), I illustrate it here for the Xamarin.Android.Support.v4 and version 23.3.0.0:

  1. Create the 23.3.0.0 directory in Xamarin.Android.Support.v4
  2. Create the directories embedded and content (embedded is very important)
  3. Extract the zip (m2repository) in the content folder
  4. From the m2repository, copy the contents of Xamarin.Android.Support.v4\23.3.0.0\content\m2repository\com\android\support\support-v4\23.3.0 to the Xamarin.Android.Support.v4\23.3.0.0\embedded directory, rename the file ending in .aar (in my case support-v4-23.3.0.aar) to support-v4-23.3.0.aar.zip, then extracting all the contents in the same folder (embedded). Note that this is package dependent, meaning for Xamarin.Android.Support.Design you will have to copy the contents of the \content\m2repository\com\android\support\design\23.3.0 folder.
  5. Now repeat step 1 through 4 for every package that causes VisualStudio to throw an error.