Message: The archiving process has failed. Please see the Errors section for more details.
Console output:
========== Build: 3 succeeded, 0 failed, 2 up-to-date, 0 skipped ==========
Archiving App Bundle 'Unio.App.Forms.Droid'...
Creating archive directory 'Unio.App.Forms.Droid'...
Creating directory 'C:\Users\User\AppData\Local\Xamarin\Mono for Android\Archives\2019-10-01\Unio.App.Forms.Droid 10-01-19 10.28 AM.apkarchive'...
Deleting files '*.apk'...
Signing 'Unio.App.Forms.Droid'...
Cannot create the archive file because the packaging process failed.
Failed to create App archive 'Unio.App.Forms.Droid'.
I was using VS 2017 and everything works fine but after installing VS 2019 it is not working.
Thanks.
Thanks for submitting this issue!
One common scenario where the Xamarin logs will show Cannot create the archive file after the Signing 'Unio.App.Forms.Droid'... message is if one of the signing properties has a typo in it. To check for that possibility or other potential problems, you can gather the diagnostic MSBuild output for the packaging and signing steps:
Option 1: Deploy the project to an emulator or device.
Set Tools > Options > Build and Run > MSBuild project build output verbosity to Diagnostic.
Set the solution to the same configuration used for the failing Build > Archive command (for example, Release | Any CPU).
Attach an Android device or emulator, and Attempt to build and deploy the project via Debug > Start Debugging.
Once the deployment fails, check the Error List window for errors. For example, if the keystore information is blank, the Error List will include the following error:
MSB4044: The "AndroidApkSigner" task was not given a value for the required parameter "KeyStore".
If those errors still leave questions about how to resolve the issue, open the View > Output window, and set Show output from to Build.
Make sure the Output window is selected, and then choose File > Save Output As to save the contents to a text file. Or copy and paste the build output into a text file.
Attach back the saved log file, optionally compressed into a .zip archive. If needed, remove any sensitive names from the log file before attaching it, or let me know if you'll need a different way to send it.
Option 2: Run the packaging and signing steps from the command line to capture the build output.
Open Tools > Command Line > Developer Command Prompt.
Run the following MSBuild command to build the solution:
MSBuild -restore -flp:v=diag;logfile=MSBuild.log -t:SignAndroidPackage -p:Configuration=Release
Check the error messages from the MSBuild command.
If those errors still leave questions about how to resolve the issue, attach back the saved MSBuild.log file from the solution directory, optionally compressed into a .zip archive. If needed, remove any sensitive names from the log file before attaching it, or let me know if you'll need a different way to send it.
Thanks in advance!
On a side note, in case it might be on interest, I've submitted a suggestion about making these MSBuild logs for Build > Archive easier to access in the future.
Hi, thank you for quiick answer!
I fixed it! It wasn't showing up the error but after this process I noticed that was a keystore issue.
@moniquealtero Hi Monique, I'm having the same issue. Could you please give more details on the problem and how you solved it?
Thanks in advance!
@moniquealtero Hi Monique, I'm having the same issue. Could you please give more details on the problem and how you solved it?
Thanks in advance!
Sure! My problem was that I migrated my VS 2017 to 2019 and my project was loading an old keystore location. So I desabled automatic android keystore signature and build my project then I added the key (manually) to deploy my app.
Thanks :)
Thanks :)
Did It work?
Deleting bin and obj folders works for me
yes somehow VS switches to keystore location when you have a new VS installation. I had the same issue after switching to new pc.
This not so enlightening message do also appears when VS have locked ... something.
Resolved by restarting VS.
Btw.. first I tried MSBUILD cmd in cmd dev - did not help.
MS Build worked here. It seems to be a bug in VS...
Disable the option "sign the .APK file using the following keystore details."
you will get this option
right click on android project select properties goto Android Package Signing.
Most helpful comment
Deleting bin and obj folders works for me