'Error importing existing keystore in VS2019 Archive Manager for Android
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.

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
Solution 1:[1]
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.
Solution 2:[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
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Ludvig Åslund |
| Solution 2 | bzyku |
