Bug 44405 - Compile error from source using "Archive for Publishing" in Stable channel.
Summary: Compile error from source using "Archive for Publishing" in Stable channel.
Status: RESOLVED DUPLICATE of bug 44184
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: dean.ellis
URL:
Depends on:
Blocks:
 
Reported: 2016-09-16 07:47 UTC by Johan Mulder
Modified: 2016-09-16 08:47 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 44184

Description Johan Mulder 2016-09-16 07:47:07 UTC
Description of Problem:

Compile project example Evolve2016 from James Montemagno. https://github.com/xamarinhq/app-evolve
This project can not be compiled in release mode using the Stable Channel. I used "Archive for publishing" functionality.  I logged this bug before on the Beta channel : https://bugzilla.xamarin.com/show_bug.cgi?id=43661
Status on this bug is fixed and verified but I now get the bug after yesterdays stable release update (15 Sep 2016).

Not sure if it is the same problem as previous bug , but I'm now stuck in the stable channel as my own project also has the same problem building apk.


Version 6.1 (build 5441)
NuGet
Version: 3.4.3.0

Operating System
Windows 10.0.14393.0 (64-bit)



Steps to reproduce the problem:
1. Compile project above in release mode using "Archive for publishing" , it will result in an error.
2. Therefor unable to produce apk file


Actual Results:

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error MSB4018: The "BuildApk" task failed unexpectedly.
Xamarin.Tools.Zip.ZipException: Entry has been changed
   at Xamarin.Tools.Zip.ZipArchive.ReadEntry(UInt64 index)
   at Xamarin.Tools.Zip.ZipArchive.AddFile(String sourcePath, String archivePath, EntryPermissions permissions, CompressionMethod compressionMethod, Boolean overwriteExisting)
   at Xamarin.Android.Tasks.BuildApk.AddAssemblies(ZipArchive apk)
   at Xamarin.Android.Tasks.BuildApk.ExecuteWithAbi(String supportedAbis, String apkInputPath, String apkOutputPath)
   at Xamarin.Android.Tasks.BuildApk.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() (MSB4018) (XamarinEvolve.Android)


Expected Results:

Compiled APK file



Additional Information:

Debug mode works fine and can run app in simulator but not release mode


Full Error :  

C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3): Error MSB4018: The "BuildApk" task failed unexpectedly.
Xamarin.Tools.Zip.ZipException: Entry has been changed
   at Xamarin.Tools.Zip.ZipArchive.ReadEntry(UInt64 index)
   at Xamarin.Tools.Zip.ZipArchive.AddFile(String sourcePath, String archivePath, EntryPermissions permissions, CompressionMethod compressionMethod, Boolean overwriteExisting)
   at Xamarin.Android.Tasks.BuildApk.AddAssemblies(ZipArchive apk)
   at Xamarin.Android.Tasks.BuildApk.ExecuteWithAbi(String supportedAbis, String apkInputPath, String apkOutputPath)
   at Xamarin.Android.Tasks.BuildApk.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext() (MSB4018) (XamarinEvolve.Android)
Comment 1 dean.ellis 2016-09-16 08:45:57 UTC

*** This bug has been marked as a duplicate of bug 44184 ***
Comment 2 dean.ellis 2016-09-16 08:47:50 UTC
Hi Johan

Thanks for the bug report. It looks like you are hitting a slightly different issue Bug 44184. We are currently investigating this issue, please add yourself to the cc list on 44184 so we can keep you up to date on our progress. 

Thanks