Compilation error (Unzipping failed.Please download https://dl-), since Xamarin Studio v5.0 upgrade.

PhilipRichPhilipRich GBMember
edited May 2014 in Xamarin.Android

Since the upgrade to Xamarin v5.0 yesterday (29/05/14) my Xamarin Android application fails to compile with the following unzipping error:-

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/support_r19.0.1.zip and extract it to the C:\Users\Philip\AppData\Local\Xamarin\Android.Support.v4\19.0.1\content directory. (XA5209).

This package is already installed via the SDK manager. I have tried a clean and rebuild. I have also tried removing the package and reinstalling it. Also attempted to restart Xamarin Studio and even the machine. I also tried targeting v18 again (as I know there was a problem targeting v19 some weeks ago), but again no luck.

Any assistance would be appreciated.

Posts

  • PhilipRichPhilipRich GBMember

    Having determined that this issue is not present for new projects, I set about stripping back my solution to determine where the problem lies. It appears to be arising from the Google Play services (Froyo) component. I have version 12.02 referenced in my project and when that component is removed (and the referencing code commented) then that application builds fine. I upgraded to the 12.0.3 version of the component, but the same errors occured. This component is integral to the application as it allows the application to obtain oauth tokens for Google. If anyone else has encountered issues with this or other components since the v5.0 upgrade to Xamarin Studio then it would be good to understand possible resolutions.

  • PhilipRichPhilipRich GBMember

    I have posted a question in the components forum additionally as this may be limited to a Google Play Services issue: http://forums.xamarin.com/discussion/17486/googleplayservices-froyo?new=1

  • JohnAschenbrennerJohnAschenbrenner USMember, University

    I am getting the same error. When I try to use Xamarin.forms.maps it uses Xamarin.GooglePlayServices

    Error XA5209: Reason: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    I will try moving my solution to a shorter directory path. However this seems like a bug in Xamarin Studio version 5. Please see - https://bugzilla.xamarin.com/show_bug.cgi?id=18495

  • AleksandrAlekseevAleksandrAlekseev ✭✭ RUMember ✭✭

    I had the same error, I moved the project to the root of drive D. Can you help.
    Now I have an error: COMPILETODALVIK

  • Pratik.3019Pratik.3019 USMember

    I solved this issue By just simply removing the duplicate reference and it starts working for me.

    Thanks.

  • AurangzebAli.5785AurangzebAli.5785 USMember

    I also get the same error
    Duplicate Refrences ..?
    I dont have any duplicate referenceS?

  • ClintonLandryClintonLandry USUniversity
    edited December 2015

    Mine was a bad zip file and upon removal of the nuget the zip file was left behind so uninstall reinstall did not resolve the issue. I needed to actually go into ...AppData\Local\Xamarin\zips and delete the corrupt file then uninstall / reinstall v7 support

  • jzeferinojzeferino ✭✭ USUniversity ✭✭

    @MichaelBurgess said:
    I got around this error by manually downloading the file to the folder it mentioned and unzipping it

    I solve my previous issues with this solution too. this error was happening because i had a slow internet and the package downloaded was corrupt.

  • AllisterAllister ✭✭ USMember ✭✭
    edited December 2015

    I have fibre yet I still get corrupt zips,

    Severity    Code    Description Project File    Line    Source  Suppression State
    Error       Reason: C:\Users\xxx\AppData\Local\Xamarin\zips\0B3F1796C97C707339FB13AE8507AF50.zip is not a valid zip file    AltBeaconLibrary.Sample.Droid           Build   
    

    I'm looking forward to this being fixed, I'm tired of downloading google zips manually, and there not being any feedback that Xamarin is downloading them and then failing in the background doesn't help things either.

    I'm not sure what Xamarin are doing, as previously it was just the android_***repository.zip that would be corrupt, now they've added their own directory and a random filename. Its like they're adding needless complexity to the system of getting android bits and pieces.

  • sha2_crensha2_cren IDMember

    @StevenFeidelberg said:
    The key to fixing this issue for me was to delete the corrupted zip files in ..\AppData\Local\Xamarin\zips.
    Then on doing rebuild Xamarin downloaded stuff again

    this also works for me.

  • Ranjith.7397Ranjith.7397 ✭✭ USUniversity ✭✭

    @ManojReddy.8431 said:
    1. Delete everything from AppData\Local\Xamarin\zips
    2. Rebuild the solution

    This works for me ("Unzipping failed" - Error gone). Then got following error

    Error 4 Please install package: 'Xamarin.Android.Support.v7.MediaRouter' available in SDK installer. Java library file C:\Users\AppData\Local\Xamarin\Android.Support.v7.MediaRouter\23.0.1.3\embedded\libs/internal_impl-23.0.1.jar doesn't exist. App2.Droid

  • BradWarrenBradWarren ✭✭ USUniversity ✭✭

    I'm getting the same error and I've tried deleting the zip, redownloading and extracting the zip but no dice. Is there a certain place you need to extract the zip? I tried the content folder.

  • Ranjith.7397Ranjith.7397 ✭✭ USUniversity ✭✭

    Please try deleting the contents of the following folder and trying a clean and rebuild.

    C:\Users\AppData\Local\Xamarin\

    this working for me.

  • Ranjith.7397Ranjith.7397 ✭✭ USUniversity ✭✭

    For Mac Machine
    Delete the contents of the following folder and clean and rebuild.

    /Users/UserName/.local/share/Xamarin

  • CinjoJoseCinjoJose ✭✭ USUniversity ✭✭

    Sometimes Android Studio will not download package because of network issues.

    Here the solution for that.

    Download zip package directly from https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip

    Delete existing package zip from C:\Users\josec\AppData\Local\Xamarin\zips and Put the downloaded package zip into it.

  • IosifAgianoglouIosifAgianoglou GRMember
    edited March 2016

    @ClintonLandry said:
    Mine was a bad zip file and upon removal of the nuget the zip file was left behind so uninstall reinstall did not resolve the issue. I needed to actually go into ...AppData\Local\Xamarin\zips and delete the corrupt file then uninstall / reinstall v7 support

    Thank you that fixed it for me, I just deleted all the zips in there and did a rebuild.(Keep backup!!!)

  • MohammadRezaMoradiMohammadRezaMoradi ✭✭ IQMember ✭✭

    Go to AppData\Local delete that Xamarin folder then go to VS and build app.
    You may need to wait some time till it builds.

    that work for me
    thank a lot

  • VinayKumar.9706VinayKumar.9706 USMember

    @MohammadRezaMoradi said:

    Go to AppData\Local delete that Xamarin folder then go to VS and build app.
    You may need to wait some time till it builds.

    that work for me
    thank a lot

    for me also it worked
    thank you

  • xCyborgxCyborg ✭✭ USMember ✭✭

    HELP HELP HELP. I can't take it any longer, when is this gonna get fixed?!!

  • MatthewWaring.4722MatthewWaring.4722 ✭✭ GBUniversity ✭✭

    @StevenFeidelberg said:
    The key to fixing this issue for me was to delete the corrupted zip files in ..\AppData\Local\Xamarin\zips.
    Then on doing rebuild Xamarin downloaded stuff again

    Worked for me on VS 2015 / Win 10, thanks for help.

  • SnehAnchliya.4079SnehAnchliya.4079 USMember

    Please fix this issue ASAP. I'm having the same issue when i create Wear App(Android).

    I have tried all the possible workaround so far but got fail so i'm not able to even compile a new solution.

  • NicholasVentimigliaNicholasVentimiglia ✭✭ USMember ✭✭

    This is stupid.

  • perozzoperozzo ✭✭ USMember ✭✭

    In addition to all that have been said above.

    1. Remove all instaled components under Components (right click, then Remove)
    2. Remove references installed by components above (sometimes the above Remove don't clean the references). Under References, right click, then Remove.
    3. Delete everything from AppData\Local\Xamarin\zips
    4. Rebuild the solution
  • EduardoRochaEduardoRocha USMember

    @ManojReddy.8431 said:
    1. Delete everything from AppData\Local\Xamarin\zips
    2. Rebuild the solution

    Worked like a charm!
    REgards man!

  • gabrielcsantosgabrielcsantos USMember

    @MaxMax.8345 said:
    Go to AppData\Local delete that Xamarin folder then go to VS and build app.
    You may need to wait some time till it builds.

    Oh my ... really thanks!
    I'm using VS 2015 Pro and this works for me.

    Microsoft need to show something warning you that has a downloading in progress because this take a time to finish and I thought that was failed or occurs some error.

  • kamilarodrigokamilarodrigo PKMember

    you can try "duplicatefilesdelter"

  • KennethCarlYbaezKennethCarlYbaez USMember

    To those who wants to fix this problem, email me @ [email protected] so that I can send you the correct file and the guide to fix it.

  • VelafurVelafur KEMember
    edited August 2016

    I seem to have the same character length problem but only when I use a CI tool like /TeamCity otherwise it it goes smoothly on VS2015. Is there some config settings in TeamCity I seem to be overlooking?

    I would like to know if there is a way I could configure TeamCity to point the downloads to a different folder.

  • zeekkkzeekkk PKMember

    how and where I can find AppData\Local\Xamarin\zips in my computer directory there no file like this I having same errors
    C:\Users\Zeeshan Haider\AppData\Local\Xamarin\zips\F16A3455987DBAE5783F058F19F7FCDF.zip is not a valid zip file:
    but when I try to find this file to delete it.the maximum path which I find Is AppData\Local\Package not AppData\Local\Xamarin\Zips. i'm new to Xamarin please can some body help me.

  • MercifulGiraffeMercifulGiraffe ✭✭ USMember ✭✭

    @zeekkk the AppData folder is a hidden folder. You need to show hidden folders before you can see it.

  • YasserIndolYasserIndol USMember

    Try deleting all files in this directory if exist. C:\Users\Philip\AppData\Local\Xamarin\Android.Support.v4\19.0.1\content.
    Download the https://dl-ssl.google.com/android/repository/android_m2repository_r25.zip and extract into that directory, something like C:\Users\Philip\AppData\Local\Xamarin\Android.Support.v4\19.0.1\content\m2repository. I solved mine with this.

  • stevenseungstevenseung ✭✭ USMember ✭✭

    this stackoverflow post helped me fix this, including step by step instructions.
    http://stackoverflow.com/questions/31483761/xamarin-forms-build-generates-several-errors#new-answer?newreg=a42217e92be447239212326fc694c3ab

    Basically the same solution as mentioned previously, but for me the problem was that the debugger was telling me there were 108 different XA5209 errors in different locations, but they were all because of one zip file located at ~/.local/share/Xamarin/zips

  • MichalTelus.7498MichalTelus.7498 ✭✭ USMember ✭✭

    Hi,
    I have similar problem, but on windows azure build agent. Maybe someone know how can I delete those files on agent? I tried using command for deleting but it can not see that path.

Sign In or Register to comment.