I had the same problem and after a long search I was able to fix it.
WHAT IS THE CAUSE OF AN ERROR?
This error occurs when
- You typed an invalid keystore password
- For some reason, your keystore is corrupt
MY CASE Script
In my case, I used the correct password, which means that my keystore was damaged.
Everything worked fine since I renamed my application and I changed the location of the keystore and apk. Then I was confused about where the keystore and apk are located, in this confusion I could replace the keystore with a new apk , which damaged the keystore, but I can not be 100% sure.
HOW I SAID IT
The fix was simple. For win7: Find the "original" keystore that was damaged, right-click it, select "Properties", "Previous Versions", select an earlier version when the keystore was in order, and click "Restore"
When you click "Previous Versions", you have to give it time (mine took 30 seconds). If nothing happens, then the key store that you are trying to restore may not be "original", it may be a copy or something else.
(I say "original" because I tried other ways to fix this error, and I had to make copies of the keystore, therefore, to use the original damaged keystore )
IF NEVER CONTINUES
If you did this and still Eclipse is not showing an alias, you may have changed the key store directory, just like me.
If you changed the keystore directory, you should do the above and then put it in the previous directory where it worked, otherwise eclipse will not find the alias!
To find out if your keystore works without using Eclipse, you can use KeyTool.
- Find the Java JRE bin folder where keytool.exe should be (mine was C: \ Program Files \ Java \ jre1.8.0_25 \ bin)
- Create a copy of your keystore (to simplify)
- Open a command prompt and run these commands
cd C: \ Program Files \ Java \ jre1.8.0_25 \ bin
keytool -list -keystore "yourkeystorename"
Then you should ask for the keystore password if the keystore is not damaged yet, which means that the restore did not work.
Remember to make copies of the working keystores every time you publish the application, and you know that the keystore works fine.