Our android project consists of mobile and wear app ( wear app is under development) and we are trying to release the mobile app. When we try to generate signed apk we get this follow message :
Error:Execution failed for task ':wear:packageRelease'. > com.android.ide.common.signing.KeytoolException: Failed to read key toyanathpatro from store "/home/adventure/toyanath_patro_key/toyanath_patro_key": No key with alias 'toyanathpatro' found in keystore /home/adventure/toyanath_patro_key/toyanath_patro_key
As it reads it says failed task for :wear:packageRelease where in reality we are selecting just the mobile while choosing for signing the apk.
Can anyone point out my blunder ? Thanks in advance.
An alias is specified when you add an entity to the keystore using the -genseckey command to generate a secret key, -genkeypair command to generate a key pair (public and private key) or the -importcert command to add a certificate or certificate chain to the list of trusted certificates.
On the search box top right, type your Android app name or part of the app name. You will see the result line, if you had saved the password. Double click on it, check the show password checkbox, give your system password when asked, and it will show your keystore password.
And the only way you can sign with a different alias would be to clone the previous one as the answer also suggests.
The problem seems to be with the wrongly spelled key alias In my case the alias should have been toyanath patro where I wrongly tried to use toyanathpatro . So the best suggestion would be:
Don't use space or invisible character in the key alias. as far as possible
There is a small selection button (3 horizontal dots) on the right side of key alias editable field. Use that button to find the alias which resides in that signature file.
In your build.gradle you have defined a signing config that it's pointing to a keystore that it's not in your code base.
Something similar to this.
android { ... buildTypes { release { signingConfig signingConfigs.staging ... } } signingConfigs { defaultSignature { keyAlias 'default' keyPassword 'password' storeFile file('default-keystore.jks') storePassword 'password' } } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With