This post is to save everyone time dealing with Unity’s sloppy bugs.
If you get the following error:
Unable to list keys in the keystore. Please make sure the location and password of the keystore are correct.
And you are sure that your password and location are correct, then here is your solution:
-
Go into the
Project Settings
→Player
→Publishing Settings
. There, type in your correct password, which will result in the error above. -
Now, open the
ProjectSettings
folder in the root folder of your project. There, you’ll find a file calledProjectSettings.asset
. Open it in a text editor. -
Find the line
AndroidKeyaliasName:
and remove everything after the two dots (:
). Then, go back into your publishing settings and open/refresh it until you reach the state where the password of the keystore is in the first password line, and the second line is empty with an empty password field that you can’t type in because Unity decided your password is wrong for no reason. -
Now, edit the line
AndroidKeyaliasName:
and type your app key name after it. So it looks likeAndroidKeyaliasName: My App Key Name
. -
If you are lucky, you can now magically type your password in the second line. If not, rinse and repeat until it works. It took me several attempts doing the same thing before at one point it worked. (Should be less than 50 times, don’t sit there for days)
-
If both passwords are in the publishing settings, just compile your
.aab
file and all is good.
This problem is known to Unity for years. Don’t ask why we have to do such absurdly ridiculous workarounds …