Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin - An error occurred trying to install required android components on Project

I have created a new Xamarin portable project in VS 2015 and I'm always getting that error

An error occurred trying to install required android components on Project 'FirstApp.Android'. Project 'FirstApp.Android' requires the following components installed on your machine: 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.v4 JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/support-v4/23.3.0/support-v4-23.3.0.aar-23.3.0.0 JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip-m2repository/com/android/support/support-v4/23.3.0/support-v4-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-v4/23.3.0/support-v4-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 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.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: XA5207 Please install package: 'Xamarin.Android.Support.Design' available in SDK installer. Java library file 'C:\Users\Kareem\AppData\Local\Xamarin\Xamarin.Android.Support.Design\23.3.0.0\content\classes.jar' doesn't exist. XA5207 Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Java library file 'C:\Users\Kareem\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.3.0.0\content\classes.jar' doesn't exist. XA5207 Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Java library file 'C:\Users\Kareem\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.3.0.0\content\libs/internal_impl-23.3.0.jar' doesn't exist. XA5207 Please install package: 'Xamarin.Android.Support.Vector.Drawable' available in SDK installer. Java library file 'C:\Users\Kareem\AppData\Local\Xamarin\Xamarin.Android.Support.Vector.Drawable\23.3.0.0\content\classes.jar' doesn't exist. XA5207 Please install package: 'Xamarin.Android.Support.Animated.Vector.Drawable' available in SDK installer. Java library file 'C:\Users\Kareem\AppData\Local\Xamarin\Xamarin.Android.Support.Animated.Vector.Drawable\23.3.0.0\content\classes.jar' doesn't exist. XA5207 Please install package: 'Xamarin.Android.Support.v7.AppCompat' available in SDK installer. Java library file 'C:\Users\Kareem\AppData\Local\Xamarin\Xamarin.Android.Support.v7.AppCompat\23.3.0.0\content\classes.jar' doesn't exist. XA5207 Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. Java library file 'C:\Users\Kareem\AppData\Local\Xamarin\Xamarin.Android.Support.v7.MediaRouter\23.3.0.0\content\classes.jar' doesn't exist. XA5207 Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. Java library file 'C:\Users\Kareem\AppData\Local\Xamarin\Xamarin.Android.Support.v7.MediaRouter\23.3.0.0\content\libs/internal_impl-23.3.0.jar' doesn't exist. 0

What I have tried

Reinstalling Xamarin.Android.Support.Design

  • It started showing me a similar error for the Xamarin.Android.Support.v7.MediaRouter package
  • When I tried to reinstall the Xamarin.Android.Support.v7.MediaRouter it started showing the error message for the Xamarin.Android.Support.Design package again

Downloading the missing files

  • Downloaded the zip file at https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip

  • Extracted the content of the design folder and copied it to C:\Users\Kareem\AppData\Local\Xamarin\Xamarin.Android.Support.Design\23.0.0\content\

nothing worked and I'm now stuck and couldn't think of anything else to try

like image 718
Scarnet Avatar asked May 31 '17 14:05

Scarnet


1 Answers

Appearntly what I needed to do is to delete the zip file in the path
C:\Users\Kareem\AppData\Local\Xamarin\zipped as it was corrupted and the visual studio will take care of re-downloading it on the next build.

Note: you could also download the files from https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip and rename it to the same name of the file inside the zipped folder

like image 179
Scarnet Avatar answered Oct 10 '22 09:10

Scarnet