I am trying to get started with Xamarin Forms, so I started creating a simple app. Everything looks fine, until I attempt to build it. After few minutes I get several errors looking like this:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error XA5209: Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r15.zip and extract it to the C:\Users\James\AppData\Local\Xamarin\Android.Support.v4\22.2.0\content directory. (XA5209) (App.Droid)
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error XA5209: Reason: C:\Users\James\AppData\Local\Xamarin\Android.Support.v4\22.2.0\android_m2repository_r15.zip is not a valid zip file (XA5209) (App.Droid)
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error XA5207: Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Java library file C:\Users\James\AppData\Local\Xamarin\Android.Support.v4\22.2.0\embedded\classes.jar doesn't exist. (XA5207) (App.Droid)
This error is replicated several times with different files. I do not believe that the issue is with my code, but there always is that possibility. What is going no and how do I fix it?
The IDE tries to download the Xamarin.Andriod.Support.v4 but fails depending on network error. Download the zip file from https://dl-ssl.google.com/android/repository/android_m2repository_r15.zip and put it in C:\Users\James\AppData\Local\Xamarin\Android.Support.v4\22.2.0\ Then rebuild the project and you should be good.
As Jason mentioned, based on the output it would appear that you are missing some required files. I would suggest opening the Android SDK Manager and updating all of the available items as well as ensuring you have the latest version of Xamarin.Android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With