5

When trying to import and existing keystore for my Android APK through Archive Manager in VS2019, i get an error and the keystore is not imported. The error message shown isn't telling me anything useful. "Importing keystore SOURCE_PATH to DEST_PATH..."

I'm not sure what's wrong or how I can fix this. I've originally lost the keystore used in the first upload so Google had to reset the certificate etc. I can import an old generated .keystore-file (which cant be uploaded since it differs from the upload cert), however I cannot import the new file.

I have tried using the keytool CMD-tool to list my keystore and it works, so I know the password is correct. Error message

What exactly can I do to solve this issue? Is there any way to get more information out of this useless error message?

Keystore information:

  • Keystore type: jks Keystore provider: SUN
  • Your keystore contains 1 entry
  • upload, 2019-aug-02, PrivateKeyEntry,
  • Certificate fingerprint (SHA1): ##############

which i generated using the following:

keytool -genkeypair -alias upload -keyalg RSA -keysize 2048 -validity 9125 -keystore keystore.jks 
keytool -export -rfc -alias upload -file upload_certificate.pem -keystore keystore.jks 
  • Maybe this can help: [https://stackoverflow.com/questions/50563523/cant-import-existing-keystore-to-visual-studio-2017/50563902#50563902](https://stackoverflow.com/questions/50563523/cant-import-existing-keystore-to-visual-studio-2017/50563902#50563902) – VahidShir Aug 26 '19 at 08:14
  • @VahidShir Since I don't have the original upload key, this is not possible. I need to import the new key. – Ludvig Åslund Aug 26 '19 at 08:23
  • I have had the same error, in my case because I wanted to import the jks file from the desktop. Importing it from the root of disk c didn't fail – Jose Aviles Mar 29 '20 at 18:01
  • I found that using password without special characters, allowed me to import the key store. – Mort Jun 18 '23 at 08:01

2 Answers2

7

Apparently i was typing the wrong alias which in return caused an error while importing it. Using the alias "upload" fixed it and I am now able to import the keystore.

2

I was the same situation in VS 2022, and instead importing i have copied keystore files into: C:\Users<your_user>\AppData\Local\Xamarin\Mono for Android\Keystore<keystore alias name>\

i have used keytool to read at first exisitng keystore alias from a keystore, than used it as a folder name

bzyku
  • 120
  • 6