From dda2b16cc860e913a8a7b9eb79f61e2fd0051101 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Fri, 2 Jul 2021 11:28:28 +0100 Subject: [PATCH] See if we can fix Rando ANDZA0000: Unable to open app.apk as a zip archive Context #6067 --- src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs b/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs index 045675191ae..645734ce261 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs @@ -168,8 +168,10 @@ void ExecuteWithAbi (string [] supportedAbis, string apkInputPath, string apkOut apk.Archive.AddStream (ms, entryName, compressionMethod: entry.CompressionMethod); } } + apk.Flush (); } - apk.FixupWindowsPathSeparators ((a, b) => Log.LogDebugMessage ($"Fixing up malformed entry `{a}` -> `{b}`")); + // this call should be redundant now + //apk.FixupWindowsPathSeparators ((a, b) => Log.LogDebugMessage ($"Fixing up malformed entry `{a}` -> `{b}`")); // Add classes.dx CompressionMethod dexCompressionMethod = GetCompressionMethod (".dex");