A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
com.android.ide.common.signing.KeytoolException: Failed to read key keycsr from store "C:...\app\csrkeystore.jks": Invalid keystore format
I have put my .jks file in app module and added signing config as:
signingConfigs {
release {
keyAlias 'keycsr'
keyPassword '********'
storeFile file('csrkeystore.jks')
storePassword '********'
}
}
Any help is appreciated.
Gradle Android tools expect your signing key to be saved in a Java Keystore File - aka
JKSformat.The error mesage
Invalid keystore formatindicates that the filecsrkeystore.jksis not a valid Java Keystore file.There are a large number of similar formats like PKCS#12, BouncyCastev1, .. that all allow to store private keys, but they are not accepted here.
My recommendation is to download the Java open source tool KeyStore Explorer and open the file
csrkeystore.jks. It will automatically detect the used file format for a large list of supported key store file types.Once the file has been loaded you can execute
Tools->Change KeyStore type->JKSand then save the jks file.Afterwards it should be possible for Gradle Android tools to read your private signing key.