Ludvig Åslund
Ludvig Åslund

Reputation: 168

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. 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:

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 

Upvotes: 5

Views: 2921

Answers (2)

bzyku
bzyku

Reputation: 140

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

Upvotes: 4

Ludvig &#197;slund
Ludvig &#197;slund

Reputation: 168

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.

Upvotes: 7

Related Questions