Share via

Unable to Import Existing Keystore

Rob Ward 1 Reputation point
2022-02-24T21:29:11.91+00:00

Trying to distrubute/sign the apk and need to reimport my keystore. It doesn't show up anymore, not sure if it disappears because of the windows 11 update or visual studios updates, on 16.11.10. When I try to import it I get "There was an error import the key"

at Xamarin.AndroidTools.PublicationUtilities.KeyManagement.<>c__DisplayClass13_0.<ImportKeyAsync>b__0(Task1 t) in D:\a\_work\1\s\External\androidtools\Xamarin.AndroidTools\PublicationUtilities\KeyManagement.cs:line 313 at System.Threading.Tasks.ContinuationResultTaskFromResultTask2.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Xamarin.VisualStudio.Publishing.Presentation.ViewModels.AndroidImportKeyViewModel.<Import>d__48.MoveNext() in D:\a_work\1\s\src\Core\VisualStudio.Publishing\Presentation\ViewModels\AndroidImportKeyViewModel.cs:line 133

Developer technologies | .NET | Xamarin

Locked Question. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

Answer recommended by moderator

Rob Ward 1 Reputation point
2022-02-28T16:34:35.3+00:00

Existing keystore doesn't seem to like my password. Ended up having to go back to an old jks keyfile that was converted years ago, it had a password with an @ symbol in it so changed the password on it and renamed the file to .keystore and it finally worked. Thanks for pointing me in the right direction.

Was this answer helpful?

1 additional answer

Sort by: Most helpful
  1. Anton Modaresi 1 Reputation point
    2026-05-19T20:58:44.6633333+00:00

    I couldn't get visual studio to import the keystore. But just moving the keystore files (keyinfo and keystore) worked. The files are in C:\Users<username>\AppData\Local\Xamarin\Mono for Android\Keystore<keyname>

    Was this answer helpful?