Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to read key *** from store ***: Cannot recover key

I've go this project, and when i try to generate a signed apk, i get this error:

Failed to read key *** from store ***: Cannot recover key

(the *** is to protect privacy)

I have read multiple answerers on here about this, most of them blame either the password, or the alias. However, i can build an earlier version of the same project, using the same keystore, with the same password and the same alias.

NOTE: The new version only changed the source code, and added some dependencies. The keystore is stored on the machine, separate from the repository.


Why wont it sign?

Any help is greatly appreciated!

like image 386
Olian04 Avatar asked Oct 30 '22 13:10

Olian04


1 Answers

I know that topic is old, but I've spotted same issue.

In my case JKS keysore was using proprietary format after migrating to PKCS12 format everything started working fine.

Type this in CMD:

keytool -importkeystore -srckeystore ***.jks -destkeystore ***.jks -deststoretype pkcs12

replace *** with name of your keystore.

like image 171
Dikey Avatar answered Nov 09 '22 08:11

Dikey