1
votes

I got the latest code for a project my colleague is working on. He can build it on his machine, but when I try to build the Xamarin.Android project I get this error:

Severity Code Description Project File Line Suppression State Error An error occurred trying to install required android components on Project 'MYPROJECT.Droid'. Project 'MYPROJECT.Droid' requires the following components installed on your machine: Xamarin.Android.Support.CustomTabs JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r32.zip-m2repository/com/android/support/customtabs/23.4.0/customtabs-23.4.0.aar-23.4.0.0 AndroidResources: https://dl-ssl.google.com/android/repository/android_m2repository_r32.zip-m2repository/com/android/support/customtabs/23.4.0/customtabs-23.4.0.aar-23.4.0.0 Xamarin.Android.Support.v4 JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r32.zip-m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.aar-23.4.0.0 JavaLibraryReference: https://dl-ssl.google.com/android/repository/android_m2repository_r32.zip-m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.aar-23.4.0.0 AndroidResources: https://dl-ssl.google.com/android/repository/android_m2repository_r32.zip-m2repository/com/android/support/support-v4/23.4.0/support-v4-23.4.0.aar-23.4.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_r32.zip:m2repository/com/android/support/customtabs/23.4.0/customtabs-23.4.0.aar' and extract it to the 'C:\Users\Darius\AppData\Local\Xamarin\Xamarin.Android.Support.CustomTabs\23.4.0.0\embedded' directory XA5209 Reason: Could not find a part of the path 'C:\Users\Darius\AppData\Local\Xamarin\Xamarin.Android.Support.CustomTabs\23.4.0.0\embedded\aapt\'. XA5207 Please install package: 'Xamarin.Android.Support.CustomTabs' available in SDK installer. Java library file 'C:\Users\Darius\AppData\Local\Xamarin\Xamarin.Android.Support.CustomTabs\23.4.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\Darius\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.4.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\Darius\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.4.0.0\content\libs/internal_impl-23.4.0.jar' doesn't exist. 0

We're both using Visual Studio 2017 Community, and have the same things installed from the Android SDK Manager.

1
did you try following the instructions in the error message?Jason
The link that it asks me to download is brokenDrake
I solved it by copying/pasting all the needed files/folders from my colleague's machine to mine, but am still interested to know why it doesn't work on its own...Drake
You're using some old support library packages here. The old behavior was to download .aars which was troublesome. The newer libs use a better technique in v25+.Jon Douglas
I think by simply deleting the support libraries from C:\Users\Darius\AppData\Local\Xamarin you will force to redownload the correct ones on the startup of VSHichame Yessou

1 Answers

0
votes

Intallation Errors: XA5209 Unzipping failed. Please download 'https://dl-ssl.google.com/android/repository/android_m2repository_r32.zip:m2repository/com/android/support/customtabs/23.4.0/customtabs-23.4.0.aar'

In this document, it mentioned:

While building a Xamarin.Android app project, you may get build errors when Visual Studio or Visual Studio for Mac attempt to download and install dependency libraries. Many of these errors are caused by network connectivity issues, file corruption, or versioning problems.

That means, when you are building your project, maybe your network is no good, so, VS can't download the libraries which are necessary for your project.

Like @Scarnet, you can delete the zips folder or manually download m2repository and rename it.