Android Build Failure. Unzipping failed.

jonathanyatesjonathanyates GBMember ✭✭✭

My Android project has suddenly started reporting the following build errors.

4>C:\Program Files (x86)\MSBuild\12.0\bin\Microsoft.Common.CurrentVersion.targets(1698,7): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file:
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5209: Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r14.zip and extract it to the C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v13\22.1.1\content directory.
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5209: Reason: C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v13\22.1.1\android_m2repository_r14.zip is not a valid zip file
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5207: Please install package: 'Xamarin.Android.Support.v13' available in SDK installer. Java library file C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v13\22.1.1\embedded\classes.jar doesn't exist.
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5209: Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r14.zip and extract it to the C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v13\22.1.1\content directory.
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5209: Reason: C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v13\22.1.1\android_m2repository_r14.zip is not a valid zip file
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5207: Please install package: 'Xamarin.Android.Support.v13' available in SDK installer. Java library file C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v13\22.1.1\embedded\libs/internal_impl-22.1.1.jar doesn't exist.
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5209: Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r14.zip and extract it to the C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v13\22.1.1\content directory.
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5209: Reason: C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v13\22.1.1\android_m2repository_r14.zip is not a valid zip file
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5206: Please install package: 'Xamarin.Android.Support.v13' available in SDK installer. Android resource directory C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v13\22.1.1\embedded./ doesn't exist.
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5209: Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r14.zip and extract it to the C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v4\22.1.1\content directory.
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5209: Reason: C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v4\22.1.1\android_m2repository_r14.zip is not a valid zip file
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5207: Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Java library file C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v4\22.1.1\embedded\classes.jar doesn't exist.
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5209: Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r14.zip and extract it to the C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v4\22.1.1\content directory.
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5209: Reason: C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v4\22.1.1\android_m2repository_r14.zip is not a valid zip file
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5207: Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Java library file C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v4\22.1.1\embedded\libs/internal_impl-22.1.1.jar doesn't exist.
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5209: Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r14.zip and extract it to the C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v4\22.1.1\content directory.
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5209: Reason: C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v4\22.1.1\android_m2repository_r14.zip is not a valid zip file
4>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(290,2): error XA5206: Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Android resource directory C:\Users\Administrator\AppData\Local\Xamarin\Android.Support.v4\22.1.1\embedded./ doesn't exist.

Does anyone know how best to fix this?

The project is part of a Xamarin Forms solution. I recently reinstalled my windows 8 VM and Visual Studio so I don't know if this is related.

Posts

  • jonathanyatesjonathanyates GBMember ✭✭✭

    Btw I already have Package Xamarin.Android.Support.v4 selected as a nuget install.

  • jonathanyatesjonathanyates GBMember ✭✭✭

    Can anyone help me here?

    Why is it saying "android_m2repository_r14.zip is not a valid zip file" ?

  • ScottSnyderScottSnyder USUniversity

    I just started having the same issue this morning too.

  • LuanvanderWaltLuanvanderWalt ZAMember

    Following this SO post worked for me. Basically, delete the 22.2.0 folder in /Users/XXXX/.local/share/Xamarin/Android.Support.Design/22.2.0 or ..\AppData\Local\Xamarin\Android.Support.Design\22.2.0 and rebuild, it will automatically generate all the files it is complaining about.

    This worked for me. Thank you

  • JacopoCappelliJacopoCappelli ITMember

    Thanks, now work correctly.

  • SubodhJenaSubodhJena USMember ✭✭

    OMG, it works for me. Thanks :)

  • @jonathonyates @LuanvanderWalt @ntayefeh

    Jonathon, hi saw your post. I don't know whether my input will help you hugely in some way.
    But.

    This specific thing: just keeps on happening to me. I mean, for you this has been the first time; but I keep getting it also periodically. And the case is such:

    suppose you had started working/created a new project from scratch in VS2013. Then like, for 5-6 weeks you had worked on it through VS IDE itself. One day, unmindful, or owing to some particular specific need, or ease of doing something particular, you opened project in Xamarin Studio and as usual kept working, did some work, code. Now when you go press F7 to build: exactly this same thing happens. This is how it mostly happens to me at least. I kind of noticed this!

  • I am also getting same error. i have tried deleting the folder but after building project again its create empty folder. Kindly help me for this issue. I am using MAC os

  • TobyEsterhuizenTobyEsterhuizen ZAUniversity

    This helped resolve it on a Mac for me - perhaps it may help:

    • Quit Xam Studio.
    • In the finder [shift]+[command]+[g] (go to folder): Go to /Users/xxxx/.local/share/Xamarin/zips
    • Then delete all the zip files in there - (reckon they were corrupt during package download)
    • Reopen Xam Studio Rebuild All
    • Run Project
  • ErumErum CNMember
    edited January 2016

    @TobyEsterhuizen Thank you! It works for me

  • debildebil USMember

    This is not working for me

  • Hi All,

    Is any one resolved the issue [Xamarin.Android.Support.v4'].If yes could you please let us know the solution for it.

    Issues:
    C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error XA5208: Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r25.zip and put it to the C:\Users\username\AppData\Local\Xamarin\Android.Support.v4\23.1.1.0 directory. (XA5208)

    C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error XA5207: Please install package: 'Xamarin.Android.Support.v4' available in SDK installer. Java library file C:\Users\ravipkr\AppData\Local\Xamarin\Android.Support.v4\23.1.1.0\embedded\classes.jar doesn't exist. (XA5207) (Events.Droid)

    What I did is that I manually downloaded the android_m2repository_r25.zip and kept in 23.1.1.0,even though I am facing same problem.

    Do we need to create the "embedded" folder inside 23.1.1.0?

    Please share it

  • Hi KoteswararaoRavipati,

    also tried to install the Xamarin.Android.Support.v4 via Nuget Paket Manager. Just Deleting the (empty) folder in \AppData\Local\Xamarin\Android.Support.v4 as described above didn't solve the problem. I also had to delete all .zip Files in \AppData\Local\Xamarin\zips. Then I reinstalled Xamarin.Android.Support.v4 via Nuget Paket Manager. After that it took a long time to build but it was successfull. I hope this helps

  • AshwiniGuptaAshwiniGupta INMember

    Following this SO post worked for me. Basically, delete the 22.2.0 folder in /Users/XXXX/.local/share/Xamarin/Android.Support.Design/22.2.0 or ..\AppData\Local\Xamarin\Android.Support.Design\22.2.0 and rebuild, it will automatically generate all the files it is complaining about.

    This will work but it take a time to build.
    Basically, it is Downloading 150MB file.

  • Hi SebastianWilkes,

    Thanks for your reply.I don't see any files under zips folder in the below mentioned path

    Path:
    /Users/xxxx/AppData/Local/Xamarin
    under this folder i have Android.Support.v4 and Android.Support.v7.AppCompat,Logs,Mono for Android and zips folder.

    but I didn't see any data inside Android.Support.v4 and Android.Support.v7.AppCompat and zips folder.Is there any thing wrong in the installation setup of Visual Studio along with Xamarin.

  • mubimubi USMember ✭✭✭
    edited May 2016

    Resolved:

    I was having the issue in build
    Please install Xamarin.Android.support.v4

    I simply deleted the folder
    C:\Users\username\AppData\Local\Xamarin\Android.Support.v4 directory
    after this solution build successfully

  • mubimubi USMember ✭✭✭

    @mubi said:
    Resolved:

    I was having the issue in build
    Please install Xamarin.Android.support.v4

    I simply deleted the folder
    C:\Users\username\AppData\Local\Xamarin\Android.Support.v4 directory
    after this solution build successfully

  • mubimubi USMember ✭✭✭

    Attention

    One more thing I want to update new developers like me
    This "Not a valid package issue" arises due to a mistake.
    Sometimes it takes too much time to process build. Try not to cancel the build process because Zip files miss their completion point and get damage.
    If it happens delete the corrupt Zip files and rebuild it again

  • ofir.3600ofir.3600 USMember ✭✭

    I don't understand why we can't have all these dependencies be Nuget packs. Can someone from Xamarin explain this? even components being a different kind of entity seems strange to me.

    Maybe now that Xamarin is a part of MS we can just unify the idea of dependencies into a single way of doing things?

  • VikasAgarwalVikasAgarwal INMember ✭✭

    I have same issue with visual studio.
    I tried to delete zip file from zip folder. when i build my app then 'C:\Users\Vikas\AppData\Local\Xamarin\Xamarin.Android.Support.v4\23.3.0.0' folder create automatically.
    Is there any issuse

  • android support library v4 doesnt exist

  • I'm working on a Xamarin.Forms project in Xamarin.Studio on a Mac, and this was the only solution that has worked for me. Thank you Toby for posting this for Mac users! This was the first time I found someone even point out where my Xamarin zip files are hidden. I lost a day of work just trying to figure out why my Android project won't build....THANKS TOBY!!!!!!

    @TobyEsterhuizen said:
    This helped resolve it on a Mac for me - perhaps it may help:

    • Quit Xam Studio.
    • In the finder [shift]+[command]+[g] (go to folder): Go to /Users/xxxx/.local/share/Xamarin/zips
    • Then delete all the zip files in there - (reckon they were corrupt during package download)
    • Reopen Xam Studio Rebuild All
    • Run Project
Sign In or Register to comment.