Xamarin studio "Error XA5209: Unzipping failed. Please download" - c#

I created a new project by selecting the default theme as Appcompat.Light, then when I run the app, I'm getting this error:
"Error XA5209: Unzipping failed. Please download dl-ssl.google.com/android/… and extract it to the /Users/username/.local/share/Xamarin/Xamarin.Android.Support.Vector.Drawable/23.3.0.0/content directory. (XA5209)."
I haven't done anything else other than create a new project, Why am i getting this error?

The process of downloading the Android.Support.V7 or other nuget could take some time.
If in the middle of the process for some reason you quit the Xamarin Studio/Visual Studio or your internet goes down the packages being download as .zip will be corrupt.
After you try to open it again you will see that message "Error XA5209: Unzipping failed. Please download dl-ssl.google.com/android/… and extract it to the /Users/username/.local/share/Xamarin/Xamarin.Android.Support.Vector.Drawable/23.3.0.0/content directory. (XA5209)."
The solution that I follow most of the times this happens is to delete the root folder of the package where the error come from (/Users/username/.local/share/Xamarin.Android.Support.Vector.Drawable) and all the .zips inside the folder /Users/username/.local/share/zips.
Click here for more Resolving Library Installation Errors

The accepted answer did not work for me, so here is what I did to make it work. Basically the solution recommended here: https://learn.microsoft.com/en-us/xamarin/android/troubleshooting/resolving-library-installation-errors.
I am developing on Windows 10, with Visual Studio 2017 Community. The Packages are located in ..user/AppData/Local/Xamarin/....
I got errors for every package I needed, meaning Xamarin.Android.Support.Animated.Vector.Drawable, Xamarin.Android.Support.v4, Xamarin.Android.Support.Vector.Drawable and about 4 more... So I did the following (solution applies to every package), I illustrate it here for the Xamarin.Android.Support.v4 and version 23.3.0.0:
Create the 23.3.0.0 directory in Xamarin.Android.Support.v4
Create the directories embedded and content (embedded is very important)
Extract the zip (m2repository) in the content folder
From the m2repository, copy the contents of Xamarin.Android.Support.v4\23.3.0.0\content\m2repository\com\android\support\support-v4\23.3.0 to the Xamarin.Android.Support.v4\23.3.0.0\embedded directory, rename the file ending in .aar (in my case support-v4-23.3.0.aar) to support-v4-23.3.0.aar.zip, then extracting all the contents in the same folder (embedded). Note that this is package dependent, meaning for Xamarin.Android.Support.Design you will have to copy the contents of the \content\m2repository\com\android\support\design\23.3.0 folder.
Now repeat step 1 through 4 for every package that causes VisualStudio to throw an error.

Related

How do I remove "multiple publish output files with the same relative path" in a dotnet core WinUI3 application?

First time poster, so please let me know if I forgot anything.
I've got a dotnet project I've been working on using WinUI3 in Visual Studio 2022. More or less it grabs some reports from Azure using Microsoft Graph.
When trying to package the application, for use on a different machine, I get the following error:
error NETSDK1152: Found multiple publish output files with the same
relative path:
C:\Users\McTwitch\source\repos\Heimdall\obj\x64\Release\net6.0-windows10.0.19041.0\win10-x64\MsixContent\Microsoft.Web.WebView2.Core.dll,
obj\x64\Release\net6.0-windows10.0.19041.0\win10-x64\R2R\Microsoft.Web.WebView2.Core.dll.
I've added
<PropertyGroup>
<ErrorOnDuplicatePublishOutputFiles>false</ErrorOnDuplicatePublishOutputFiles>
</PropertyGroup>
to my .csproj file, and that gives me a different error:
Severity Code Description Project Path File Line Source Suppression State
Error APPX1101 Payload contains two or more files with the same destination path 'Microsoft.Web.WebView2.Core.dll'. Source files:
C:\Users\McTwitch\source\repos\Heimdall\obj\x64\Release\net6.0-windows10.0.19041.0\win10-x64\MsixContent\Microsoft.Web.WebView2.Core.dll
C:\Users\McTwitch\source\repos\Heimdall\obj\x64\Release\net6.0-windows10.0.19041.0\win10-x64\R2R\Microsoft.Web.WebView2.Core.dll SIEMGUI C:\Users\McTwitch\.nuget\packages\microsoft.windowsappsdk\1.2.221109.1\buildTransitive C:\Users\McTwitch\.nuget\packages\microsoft.windowsappsdk\1.2.221109.1\buildTransitive\Microsoft.Build.Msix.Packaging.targets 1504 Build
I've also checked Tools>NuGet Package Manager > Manage NuGet Packages for this Solution, but there aren't any entries under "Consolidate".
There was one post (Publish error: Found multiple publish output files with the same relative path) that mentioned adding some lines to the common.props file, but I haven't been able to locate the file, which is a tad frustrating.
Any and all help is appreciated, and I'll try to reply as quickly as I can to any additional questions or requests for information.

Xamarin not installing packages, error XA5209 & XA5207

I have a problem with Xamarin in Visual Studio.
I am working with Xamarin.Forms and Xamarin.Android. My problem is that that android component of the project do not install themselves. The zip folder is empty and the component folders are empty.
Solutions I tried:
Delete the the ./AppData/Local/Xamarin (in windows) folder which is supposed to force the IDE to download the appropriate packages (does not work)
Downloaded the m2repository_r29, put it in zip folders and give it his hash name (does not work)
Install manually each library : download, unzip and put in right folder (works, but is super long for each library from this source https://learn.microsoft.com/en-us/xamarin/android/troubleshooting/resolving-library-installation-errors#Manually_Downloading_m2repository)
This is a sample of the error message I get:
Severity Code Description Project File Line Suppression State
Error An error occurred trying to install required android components on Project 'Project.AndroidClient'.
Project 'Project.AndroidClient' 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
...
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 'C:\Users\...\AppData\Local\Xamarin\Xamarin.Android.Support.Animated.Vector.Drawable\23.3.0.0\embedded' directory
XA5209 Reason: ...
Please help, I am new to all this and I don't know what to do.
Use nugets instead, xamarin is migrating fully from components to nugets on May, 5th

Xamarin Forms Project builds with errors

I'm using VS2015 and the latest version of Xamarin. I'm trying to build a blank Xamarin Forms project, but when I go to just build the project, I get this error:
Download failed. Please download
https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip
and put it to the
C:\Users\warrenbr\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3
directory.
XamarinForms.Droid
So I've downloaded the zip and extracted it into the directory, tried to rebuild the project, but no dice. Is there a certain way I have to extract it, or certain folders I have to pull out of the zip?
OK, so I had to unzip the contents of the zip into a content folder for each package:
C:\Users\%username%\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3\content
C:\Users\%username%\AppData\Local\Xamarin\Android.Support.Design.v4\23.0.1.3\content
etc...
Then I ended up restarting Windows, and that seemed to do the trick. Rebuilding the solution didn't seem to fix it before this.
You need to delete all from the path: C:\Users\USERNAME\AppData\Local\Xamarin Folders and Zip files. And then rebuild your project.

Xamarin.Forms: Android project Build Error - Missing Files inside AppData\Local\Xamarin Folders

I'm trying the Xamarin.Forms.
I created a Solution named "App2". The Visual Studio automatically created the following projects:
App2 (Portable)
App2.Droid
App2.iOS
When I try to compile the Android Project (App2.Droid), I get the following errors:
Download failed. Please download
https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip
and put it to the
C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3
directory. App2.Droid Reason: One or more errors. App2.Droid
Please install package: 'Xamarin.Android.Support.Design' available in
SDK installer. Java library file
C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3\embedded\classes.jar
doesn't exist. App2.Droid Download failed. Please download
https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip
and put it to the
C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3
directory. App2.Droid Reason: One or more errors. App2.Droid
Please install package: 'Xamarin.Android.Support.Design' available in
SDK installer. Android resource directory
C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3\embedded./
doesn't exist. App2.Droid
I've already tried to:
Download the android_m2repository_r22.zip file and put it on the C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3 folder
Download the file and extract it to the folder
Delete the C:\Users\pedro.costa\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3 folder and recompile project
Delete the C:\Users\pedro.costa\AppData\Local\Xamarin\zips folder and recompile the project.
Update the Xamarin.Android.Support.* nuget packages, but when I try it, I also get those build errors.
I've done a lot of research and it seems that the Android.Support.* folders should have files inside it, and that those files should be downloaded when the android solution is built, but it is not happening for me.
Try this work around :
Navigate to C:\Users\[user-name]\AppData\Local\Xamarin\zips folder.
Remove all zip files.
Remove /bin and /objfrom your project.
Clean and build your project.
It may take a while to build and debug project.
1.download
https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip
2.rename to 2A3A8A6D6826EF6CC653030E7D695C41.zip
3.copy to C:\Users\User\AppData\Local\Xamarin\zip
4.rebuild
I saw in other answers to this problem, that by just deleting all the content from the Android.Support.Design folder, Visual Studio would download it again once the project was rebuild.
The problem in my case, was a proxy issue. When I set my environment to access the internet without the proxy, Visual Studio download the necessary files and folders on the rebuild.
Don't extract the zip to \23.0.1.3folder or just put it there, that won't work don't mind the error message.
You must put the zip in the \zip folder, after you delete the already existing zip, you may need to rename the zip you downloaded to something like: 2A3A8A6D6826EF6CC653030E7D695C41.zip
But if you don't want to manually download the support repository you can just delete everything in the %USER%\AppData\Local\Xamarin\ folder and rebuild and wait.
there is a zips name folder over this address C:\Users\[user-name]\AppData\Local\Xamarin\zips
first u have to check it the file is in extract condition there we can see an error it is an currupt format then u can replace those two files
1)2A3A8A6D6826EF6CC653030E7D695C41.zip replace by this link rename with 2A3A8A6D6826EF6CC653030E7D695C41
2)96659D653BDE0FAEDB818170891F2BB0.zip replace by this link rename with 96659D653BDE0FAEDB818170891F2BB0
then rebuild the project

How Do You Clear an ASP.NET app for compiling?

I have been building and rebuilding an ASP.NET program.
I made the horrible mistake, I think, of recently copying the published content back to the folder I was developing.
So now I have an unusual error when I build the code. It says That there is a duplicate definition in one file in a temporary directory with anohter file in a temporary directory.
Error 3
The type 'ChildEventHandler' exists in both
'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
Files...\b90cc7a4\28d266b\assembly\dl3\c4cf1ea3\b6e4b808_ef7cce01\App_Code.DLL'
and 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET
Files...\b90cc7a4\28d266b\App_Code.asx5jp5d.dll' C:\inetpub\wwwroot...\Resources\usercontrols....ascx.cs 11 18 C:......\
I removed project and file names, of course, but this is basically what the error says.
Since the error is with temporary files, what should I do?
I do not see a "clear" option in visual studio to clear out the files of a compile.
This problem I faced sometimes back while compiling. Go to this folder
c:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files and delete all the files and folder under it. When you build an application which is not hosted under IIS, temporary debug files and folder get created under this folder.
It may happen that you get an access denied error while deleting them. Close your Visual Studio solution and delete everything under this folder. It will resolve the compilation error.
For those using Visual Studio 2015 in Windows 8 or Windows 10, the solution is to remove all temp files from the following location:
%AppData%\Local\Temp\Temporary ASP.NET Files
and then rebuild your Solution.
In my case, the error is come from some cshtml files that are under project folder but not included in project. So if you search the error in entire solution, it couldn't be found. You can use show all files to show the not included files, and try to open them to find the possible files that cause the error.
If you haven't got the option of "Clean Solution" (maybe Express verions, or pre-2010 don't have this?) then, to fix this error, simply go to the /bin folder of your solution and delete all items, then Build again.
This will recompile all the DLL files.

Categories