APK signing error : Failed to read key from keystore
Check your keystore file for first, in you example you creating file with name my-release-key.keystore. If its correct and really present in folder Users/bournewang/Documents/Project
check alias, in your example it is -alias alias_name, but in config you specified alias mike
Issue signing Android Release Build Failed to read key from keystore
My problem was that I had entered a random keyAlias
. When trying to sign the apk using the IDE (IntlliJ Idea and Android Studio: Build menu -> generate signed APK), by clicking the ellipse button (...
) next to the textbox for entering key alias, I found the correct key alias that I had earlier set for my keystore. Double check that you are not entering some ad-hoc random password and keyAlias for your keystore as they should be identical to the password and key alias you set for your keystore when creating it.
If you have forgotten either the password or the key alias, I am afraid you have to create a new keystore as you cannot read your keystore without these. I suggest saving these two properties (and attaching your keystore file) in a password manager like Lastpass, as you need them in future.
Failed to read key key1 from store even tho key is 100% correct
I fixed the issue, and I hate Android studio so much for that. Instead of writing this:
KEYPW='CENSORED'
you have to write this
KEYPW=CENSORED
Duh. Wasted another hour of my life
Android Studio. Building signed APK. Get Key Failed
If you get error like block not properly padded
, bad key
or PKCS12
when signing the App Bundle or APK, try using the same password for the key and the keystore file, it works for me.
Updated to Android Studio 4.2, Try to generate Signed Bundle / APK. Failed to read key from keystore and Given final block not properly padded.
Try to use same password for the keystore and the key.
Related Topics
How to Remove the Unnecessary Top Padding of the Navigation View
How to Separate a Country Code from a Phone Number in Android
Adb Is Not Detecting My Android Device on Ubuntu
Android: Open a Pdf from My App Using the Built in Pdf Viewer
Sending Files Using Post With Httpurlconnection
How to Set Button Click Effect in Android
How to Make My App Work in All Devices
How to Remove Focus from Edittext When User Is Done Editing
How to Quit Android Application Programmatically
Getting Simple Json Object Response Using Retrofit Library
Making Voice Calls from Android Phone Connected to Linux
Convert File: Uri to File in Android
Link Should Be Open in Same Web View in Android
How to Scroll Scrollview to Bottom Programmatically in Android
Prevent Screen Rotation on Android
Error With Android Studio: Cannot Launch Avd in Emulator
React Native | Failed to Install the App. Please Accept All Necessary Sdk Licenses Using Sdk Manager