0
votes

**I keep getting these error messages over and over again:

  1. The network connection is great. There's no problem downloading the zip files.
  2. The packages zip files are not corrupted as they can all be unzipped manually.
  3. Even when the project finally builds these problems keep re-occuring.

I've read almost 50 post around these issues from the last 3 years. Tries ALL solutions. None of them is a consistent solution.

[xamarin.forms, package reference, visual studio 2017 community, windows 7]

Error An error occurred trying to install required android components on Project 'MobileApp.Android'. Project 'MobileApp.Android' requires the following components installed on your machine: Xamarin.Android.Support.Animated.Vector.Drawable JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/animated-vector-drawable/23.3.0/animated-vector-drawable-23.3.0.aar-23.3.0.0 AndroidResources: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/animated-vector-drawable/23.3.0/animated-vector-drawable-23.3.0.aar-23.3.0.0 Xamarin.Android.Support.Design JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/design/23.3.0/design-23.3.0.aar-23.3.0.0 AndroidResources: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/design/23.3.0/design-23.3.0.aar-23.3.0.0 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 Xamarin.Android.Support.v7.RecyclerView JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/recyclerview-v7/23.3.0/recyclerview-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/recyclerview-v7/23.3.0/recyclerview-v7-23.3.0.aar-23.3.0.0 Xamarin.Android.Support.Vector.Drawable JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/support-vector-drawable/23.3.0/support-vector-drawable-23.3.0.aar-23.3.0.0 AndroidResources: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/support-vector-drawable/23.3.0/support-vector-drawable-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/animated-vector-drawable/23.3.0/animated-vector-drawable-23.3.0.aar' and extract it to the 'd:\Users\xxx\AppData\Local\Xamarin\Xamarin.Android.Support.Animated.Vector.Drawable\23.3.0.0\embedded' directory XA5209 Reason: Could not find a part of the path 'd:\Users\xxx\AppData\Local\Xamarin\Xamarin.Android.Support.Animated.Vector.Drawable\23.3.0.0\embedded\aapt\'. XA5207 Please install package: 'Xamarin.Android.Support.Animated.Vector.Drawable' 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.Design' 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.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. XA5207 Please install package: 'Xamarin.Android.Support.v7.RecyclerView' 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.Vector.Drawable' available in SDK installer. Java library file 'C:\Program Files (x86)\Android\android-sdk\extras\android\classes.jar' doesn't exist. 0

1
I suggest you reinstall VS if all of the solutions can't fix your problem.Robbit
It indeed worked for me once, but after a while the problem reoccurs.Hanch
Hello, have you solved it?Robbit
I have manually copied and extracted these libraries into where Xamarin expects them. It didn't work every time, but it does work now...Hanch

1 Answers

0
votes

I'm pretty sure there's nothing deterministic you can do to resolve that. It's related to some synching between the various processes involved in the execution (builder, debugger, RT engine, etc.) That's why reinstalling VS helps. Cleaning the Nuget packages DID help in several cases but not always. It also helped in certain cases to just uninstall specific Android nuget libraries (usually the android support ones) and then reinstall them. When the entire machine is relatively idle (i.e. processes are not starving for available threads) the build/ link stages pass more successfully.