C# Xamarin android “Central Directory record could not be found”

Following issue occurs when building the Xamarin Android project.

Output Window Details

1>------ Rebuild All started: Project: XYZ.Droid, Configuration: Debug Any CPU ------
1>C:\Users\amila.s\Desktop\XYZ\ABC.Mobile-develop\ABC.Mobile-develop\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets(114,3): error : End of Central Directory record could not be found.
1>C:\Users\amila.s\Desktop\XYZ\ABC.Mobile-develop\ABC.Mobile-develop\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets(114,3): error : at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory()
1>C:\Users\amila.s\Desktop\XYZ\ABC.Mobile-develop\ABC.Mobile-develop\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets(114,3): error : at System.IO.Compression.ZipArchive.Init(Stream stream, ZipArchiveMode mode, Boolean leaveOpen)
1>C:\Users\amila.s\Desktop\XYZ\ABC.Mobile-develop\ABC.Mobile-develop\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets(114,3): error : at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding)
1>C:\Users\amila.s\Desktop\XYZ\ABC.Mobile-develop\ABC.Mobile-develop\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets(114,3): error : at Xamarin.Build.Download.XamarinBuildAndroidAarRestore.LoadResource(String resourceFullPath, String assemblyName)
1>C:\Users\amila.s\Desktop\XYZ\ABC.Mobile-develop\ABC.Mobile-develop\packages\Xamarin.Build.Download.0.4.7\build\Xamarin.Build.Download.targets(114,3): error : at Xamarin.Build.Download.BaseXamarinBuildResourceRestore.MergeResources(IAssemblyResolver resolver, String originalAsmPath, String mergedAsmPath, String assemblyName, List`1 resourceItems)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

Error Window Details

Severity Code Description Project File Line Suppression State Error End of Central Directory record could not be found. at System.IO.Compression.ZipArchive.ReadEndOfCentralDirectory() at System.IO.Compression.ZipArchive.Init(Stream stream, ZipArchiveMode mode, Boolean leaveOpen) at System.IO.Compression.ZipArchive..ctor(Stream stream, ZipArchiveMode mode, Boolean leaveOpen, Encoding entryNameEncoding) at Xamarin.Build.Download.XamarinBuildAndroidAarRestore.LoadResource(String resourceFullPath, String assemblyName) at Xamarin.Build.Download.BaseXamarinBuildResourceRestore.MergeResources(IAssemblyResolver resolver, String originalAsmPath, String mergedAsmPath, String assemblyName, List`1 resourceItems) PayByCar.Droid

There are seem to be no much support regarding this issue. It would be highly appreciated if anyone could help on this. Thanks.

Answers

  • JamesLaveryJamesLavery GBBeta, University ✭✭✭✭✭

    @Amila - did you find a solution to this? We're getting this error when building an app on Windows (which builds on the Mac).

Sign In or Register to comment.