23

I have generated an app bundle and published it in the play store successfully. Now I am trying to generate a signed apk(to test in device) and I am getting Password verification failed. I googled and tried every solutions found in stackoverflow, but nothing solved my problem. Then I tried generating a new keystore with new alias and passwords. Again I am getting same error for the new keystore also. I am using Android Studio 3.3, gradle 3.3.1. enter image description here

Suresh Kumar
  • 1,874
  • 3
  • 15
  • 30

9 Answers9

43

I was with the same problem.
Try to clean Project and then Rebuild Project!
It Solved my problem

Donkaike
  • 456
  • 3
  • 5
7

I ran into the same problem on upgrade to android studio 4.2.

The following steps solved the problem:

  1. Update gradle plugin to the latest
  2. Build -> Clean project
  3. File -> Invalidate caches / restart
  4. Build -> generate signed bundle / apk...
  5. Delete the existing pre-typed passwords, and type them again.
wiz
  • 171
  • 1
  • 3
6

Updating the gradle to latest version solved the issue. I was having gradle 3.3.0, updating it to 3.3.1 solved the issue. Thought of sharing it as it may solve the issue for someone if they are facing the same problem.

Suresh Kumar
  • 1,874
  • 3
  • 15
  • 30
2

I was also stuck with same problem. i was keeping the same password as keystore password I tried with other password and it worked.

Generate an upload key and keystore If you don't already have an upload key, which is useful when opting in to App signing by Google Play, you can generate one using Android Studio as follows:

1)In the menu bar, click Build > Build > Generate Signed Bundle/APK.

2)In the Generate Signed Bundle or APK dialog, select Android App Bundle or APK and click Next.

3)Below the field for Key store path, click Create new.

4)On the New Key Store window, provide the following information for your keystore and key,

5)Keystore

Key store path: Select the location where your keystore should be created.

Password: Create and confirm a secure password for your keystore.

6)Key

Alias: Enter an identifying name for your key.

Password: Create and confirm a secure password for your key. This should be different from the password you chose for your keystore.

Validity (years): Set the length of time in years that your key will be valid. Your key should be valid for at least 25 years, so you can sign app updates with the same key through the lifespan of your app.

Certificate: Enter some information about yourself for your certificate. This information is not displayed in your app, but is included in your certificate as part of the APK.

7)Once you complete the form, click OK.

8)If you would like to build and sign your app with your upload key, continue to the section about how to Sign your app with your upload key. If only want to generate the key and keystore, click Cancel.

1

If clean project does not work, manually delete the build folder inside the app folder and try.

Bijesh
  • 307
  • 3
  • 10
1

Just re-enter the passwords it will work if other solutions did not.

0

I have the same problem, and it could be many things, one human error that was happening to me was this: I was copy and pasting the password from a string in java, and there is a special character in those passwords sometimes for example: "kw({{sa123$vn", so remember to remove the first the symbol

\

I tried multiple times until I got it.

dicarlomagnus
  • 145
  • 11
0

Make sure your keyPassword and storePassword in build.gradle are not swapped.

Embarassing, but it was working in the Build>Generate Signed Bundle but not via the build.gradle so I ended up burning 30 minutes wondering why. Just making this comment in case it helps anyone else since I didn't see anyone mention it.

dog
  • 832
  • 10
  • 9
-3

enter image description here before create build , check you have the select release option

Imran khan
  • 79
  • 1
  • 12