Warning: Different store and key passwords not supported for PKCS12 KeyStores. Ignoring user-specified -keypass value. in Android Studio

I am trying to create a new Keystore to generate a signed apk but I am getting an error like this, please help me to get rid of this error.

enter image description here

enter image description here


Solution 1:

This is a known issue with Android Studio 4.2. It runs on JDK11 which has this limitation.

Google's own documentation on app signing states that the key password "should be different from the password you chose for your keystore" so I'm guessing they intend to fix this at some point.

Solution 2:

The key store password and key password should be the same in order to avoid this error. However before I was able to release and deliver apps where key store password and key password are different and I still use it today when updating my apps. If anyone can point out what happened here or is this a part of update before and after the new Android Studio Arctic Fox please provide some source.

Solution 3:

Android Studio Version 4.2 Update

Now Android Studio runs on JDK 11. Due to these changes, the signing keys issue is coming.

Solution

Use the same password for both the Key and Keystore.

Solution 4:

I got caught by this after upgrading to Android Studio 4.2 too.

One workaround I found is to first create the keystore file with the same password in Android Studio then switch to an old JDK (pre 11) and use the keytool command to update the key password.

  1. Find and use an old version of Java (Sorry assumes Mac or Linux but setting JAVA_HOME on Windows should work too.)
    $ /usr/libexec/java_home -V
    $ export JAVA_HOME=$(/usr/libexec/java_home -v OLD_VERSION)
    
  2. Run keytool to update your key password.
    $ keytool -keypasswd -keystore PATH_TO_KEY_STORE -alias ALIAS -storepass STORE_PASSWORD -keypass OLD_KEY_PASSWORD -new NEW_KEY_PASSWORD
    

Solution 5:

I was very surprised when I entered the same with key password and password and got the right result. and jks file created successfully in android studio 4.2.