Issue
I am trying to distribute my Xamarine APK from within Visual Studio 2019 using the Archive and Distribute screens in VS. This process worked last time I tried it but that was about a year ago.
I can build and run my app in an emulator fine and I can archive the package as well.
The problem comes when I try to distribute the APK. I am using the Adhoc Distribution method. At this point I get the error message:
[I:]: Converting signing algorithm from SHA256withRSA
[E:]: SignPackageAsync faulted
Xamarin.AndroidTools.AndroidSdkToolException: Missing input APK
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xamarin.VisualStudio.Android.Services.Publishing.AndroidToolsPublishService.<SignPackageAsync>d__4.MoveNext() in E:\A\_work\387\s\src\Core\VisualStudio.Android\Services\Publishing\AndroidToolsPublishService.cs:line 41
I don't think the issue is a password issue with the certificate because I have tested by entering the incorrect password and this gives me a different error message.
I have also increase logging to Diagnostic but nothing more useful appears in the logs.
Any suggestions on what the issue is or how I can better diagnose the problem?
Solution
Turns out with was an issue with the keystore password having special charaters as mentioned in the links. I had to use the Keystore tool to change the password:
"%JAVA_HOME%\bin\keytool.exe" -storepasswd -keystore "<FilePath>.keystore" -storepass "<store password>" -new "<new password>"
"%JAVA_HOME%\bin\keytool.exe" -keypasswd -keystore "<FilePath>.keystore"
-storepass "<new password>" -alias "<alias>" -keypass "<key password>" -new "<new password>"
If the keystore you generated was via Visual Studio then the Store Password and the Key Password are the same. You will also need to make sure they are the same afterwards, otherwise using Distribute in VS won't work.
Answered By - Michael Edwards
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.