1
votes

After updating Xamarin for Visual Studio to v'4.3.0.789' and jdk 1.8. I am getting this error. I have tried all possible way but unable to resolve.

Severity Code Description Project File Line Suppression State Error An error occurred trying to install required android components on Project 'CrossPlatformApp2.Android'. Project 'CrossPlatformApp2.Android' requires the following components installed on your machine: Xamarin.Android.Support.v7.AppCompat JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/appcompat-v7/23.3.0/appcompat-v7-23.3.0.aar-23.3.0.0 AndroidResources: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/appcompat-v7/23.3.0/appcompat-v7-23.3.0.aar-23.3.0.0 Xamarin.Android.Support.v7.MediaRouter JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/mediarouter-v7/23.3.0/mediarouter-v7-23.3.0.aar-23.3.0.0 JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/mediarouter-v7/23.3.0/mediarouter-v7-23.3.0.aar-23.3.0.0 AndroidResources: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/mediarouter-v7/23.3.0/mediarouter-v7-23.3.0.aar-23.3.0.0

Please double-click here to install it.

Intallation Errors: XA5209 Unzipping failed. Please download 'https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip:m2repository/com/android/support/appcompat-v7/23.3.0/appcompat-v7-23.3.0.aar' and extract it to the 'C:\Users\prashantvarma\AppData\Local\Xamarin\Xamarin.Android.Support.v7.AppCompat\23.3.0.0\embedded' directory XA5209 Reason: The process cannot access the file 'C:\Users\prashantvarma\AppData\Local\Xamarin\Xamarin.Android.Support.v7.AppCompat\23.3.0.0\embedded\res\drawable-xxhdpi-v4' because it is being used by another process. XA5207 Please install package: 'Xamarin.Android.Support.v7.AppCompat' available in SDK installer. Java library file 'C:\Program Files (x86)\Android\android-sdk\extras\android\classes.jar' doesn't exist. XA5207 Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. Java library file 'C:\Program Files (x86)\Android\android-sdk\extras\android\classes.jar' doesn't exist. XA5207 Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. Java library file 'C:\Program Files (x86)\Android\android-sdk\extras\android\libs/internal_impl-23.3.0.jar' doesn't exist. 0

However, my old application (created in old Xamarin version) is able to run.

2
Working with Xamarin for 1,5 years now. A clean reinstall did help sometimes. - Thomas Christof

2 Answers

0
votes

I used to have this error as well. Try the underlying fix I wrote and use myself.


If you get multiple errors when trying to build the project (e.g. ~14 errors) which state that the unzipping of packages failed and that you will have to do it manually, then do the following:

  • Go to the path stated in the error
  • Go a folder (or 2) higher until you see a folder called "zips".
  • Delete all the content in that (“zips”) folder and retry building.

The build will take a bit longer, so have some patience. This error is caused by a corrupted zip of a needed package in the build, mostly caused by aborting a build. Deleting the files will force the compiler to redownload the packages which will fix the corrupted zips issue.

0
votes

Ok, I am able to resolve this issue simply by uninstalling Xamarin and installing again the older version (v4.2.1) that shows in Visual studio Professional 2015 Setup.