"ERROR: Cannot recover key" When Exporting Signed Android App with Existing Keystore
Pretty sure you just entered the password incorrectly. Happened to me just now, stumbled upon your question, hoping for an answer. Didn't find any, so I tried typing the password again. And then it worked.
Related videos on Youtube
Dzhuneyt
A decade of industry experience, gaining some knowledge along the way in a wide array of technologies. Since 2012, I've been actively involved with Docebo SpA, one of the largest, award-winning, cloud-based eLearning platforms (source: http://www.brandonhall.com/excellenceawards/excellence-learning.php?year=2018) Currently serving as SCRUM master and Team Leader of a team of 5 developers @ Docebo. In parallel, I am the CTO ScavaSoft. A Bulgaria-based software development firm, that is in close partnership with Docebo. Inside ScavaSoft, I am responsible for supporting a team of ~20 developers in their career journey as web developers and also making sure things run smoothly in terms of local server architecture (Redis/MySQL databases, local development machines, etc). As a hobby, running a mobile app development studio @ http://HasMobi.com Occasionally I blog about programming @ http://blog.dzhuneyt.com Some of my open source projects @ https://github.com/Dzhuneyt Occasionally I blog about my other hobby - photography @ http://snimam.be. If you want some inspiration, you can check out my 500px gallery @ https://500px.com/dzhuneyt
Updated on June 04, 2022Comments
-
Dzhuneyt almost 2 years
I have an existing keystore with a password and a few keys with different passwords inside for the different apps I have exported and uploaded to Google Play.
Now I have recently imported one of the app's projects, did some significant modifications to it and I am trying to export it using the same keystore and choosing the same alias/password as I did while initially creating it.
The problem is that after the step where I choose the key alias and enter key password I see "ERROR: Cannot recover key".
I suspect that I might be entering a wrong key password (note that the keystore password is the correct one, so this is not the reason for the issue).
I tried creating a new alias and exporting the app under it, but Google Play won't accept this file unless it's signed with the same certificate.
I really don't know how to proceed in this scenario besides trying to brute force the key password. If you think this is the only path, do you know a good brute force cracking tool for keys in a keystore, for which I already know the password to? The keystore is a .reg file, created with Eclipse's Export wizard.
-
Prateek over 10 yearshello I actually have my keystore certificate and also I remember my keystore password and inside the dropdown I can see the Alias name I used to sign the apk but I have forgotten the password in the key alias section , can it be recovered somehow.
-
Hugh Jeffner over 10 yearsA strange quirk I discovered: (using adt 22.3 and probably prior versions) Once you have entered an incorrect key password (not keystore paswword) you are "locked out" from further attempts until you close the Export Android Application dialog. You cannot simply press the back button and try again.
-
Zerga over 10 yearsI did it twice incorrectly, came here, read your answer, tried again and then it worked. Could be that i closed the dialog meanwhile though like Hugh Jeffner described.
-
faizal over 9 yearsFor me, the problem was one of the keys on my keyboard was stuck. realized it only after typing it in an editor to see what i was actually typing in as the password.
-
Joe Maher about 8 yearsFor me i realised that even after entering the incorrect password 5 times it accepted the last attempt (even though it was wrong) which caused the error and then, because i had chosen to remember the passwords it was using the wrong passwords for all the following builds. So i restarted Android Studio and it worked :)