0
votes

I want to generate an APK for the Android version of my app. I never had a problem doing it on Visual Studio for Mac, but this week started not working anymore.

I get this error after I type my keystore password:

Signing Failed

Could not load file or assembly 'Ionic.zip, Version=1.9.3.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.

enter image description here

It happens even when I try to resign an older archive that I signed before with the same keystore, but it succeeds when I keep the old signature.

Publishing iOS IPAs works normally.

Anyone has an idea of how to correct it?


Publishing Log:

Begining distribution, 4/10/2018 9:15:49 AM

Channel: Ad Hoc

App Bundle Id: br.com.cartaomagnus.magnusempresario, Version: 2.0.0

Publishing Ad Hoc to /Users/brunoserrano/Downloads/br.com.cartaomagnus.magnusempresario.apk

Signing packages...

Detected signing algorithm as : RSA

ERROR:Signing Failed

ERROR:System.IO.FileNotFoundException: Could not load file or assembly 'Ionic.Zip, Version=1.9.3.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.

File name: 'Ionic.Zip, Version=1.9.3.0, Culture=neutral, PublicKeyToken=null'

at MonoDevelop.MonoDroid.AndroidPublisher+<>c__DisplayClass59_0.b__1 (System.Threading.Tasks.Task st) [0x00019] in /Users/builder/data/lanes/5810/0d8e3f0a/source/md-addins/MonoDevelop.MonoDroid/MonoDevelop.MonoDroid/Archival/AndroidPublisher.cs:274

at System.Threading.Tasks.ContinuationResultTaskFromTask`1[TResult].InnerInvoke () [0x00024] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/Tasks/TaskContinuation.cs:111

at System.Threading.Tasks.Task.Execute () [0x00010] in /Users/builder/data/lanes/5533/mono-mac-sdk/external/bockbuild/builds/mono-x64/mcs/class/referencesource/mscorlib/system/threading/Tasks/Task.cs:2502

Saving state back to archive

Finshed

1
Use the Help -> Report a Problem feature in the IDE to report this issue. - Jon Douglas
Already did it, waiting for an answer there and maybe a workaround here. - Bruno Serrano
I would recommend using the target and property /t:SignAndroidPackage /p:Configuration=Release in MSBuild for now. - Jon Douglas
I generated my signed APK successfully using MSBuild, thank you! - Bruno Serrano

1 Answers

0
votes

Meanwhile Microsoft and Xamarin team check my report, I could generate my signed APK using MSBuild in Terminal, thanks to @JonDouglas comment.

In the Droid folder of my project, I ran it in Terminal:

MSBuild "/t:SignAndroidPackage" "/p:Configuration=Release" "/p:AndroidKeyStore=true" "/p:AndroidSigningKeyAlias=YourKeyAlias" "/p:AndroidSigningKeyPass=YourKeyStorePassword" "/p:AndroidSigningKeyStore=YourKeyStoreFilename" "/p:AndroidSigningStorePass=YourKeyStorePassword" "YourAppName.csproj"