I'm having an error recovering my key in Android Studio.
I know the key alias and I have the correct password for both.
I know this because I am able to run: keytool -list -v -keystore mykeystore.jks -alias myKey -storepass myPass -keypass myPass
in cmd and get my certs.
My storepass and keypass are the same and I copied and pasted all of the values from cmd to android studio, but I still get this error.
I've also tried restarting android studio and manually retyping my passwords and alias multiple times to no avail.
Related
I have old Xamarin android project. I made small changes and changed target to android x. The customer sent me a keystore file with password and alias. Now I need to sign and publish the package in google play. But I am getting the error your fingerprint does not match:
-need "Sha1Need"
-current "Sha1Other"
I check my key file with command:
keytool -list -v -keystore "my.keystore" -alias key -storepass mypass -keypass mypass
I get result value "Sha1Need".
Than I checking my apk with command:
keytool -printcert -jarfile my.apk
I get value "Sha1Other". How is it possible? And how can I fix this?
I use this code in my .csprj file:
<AndroidSigningKeyStore>app.keystore</AndroidSigningKeyStore>
<AndroidSigningStorePass>mypass</AndroidSigningStorePass>
<AndroidSigningKeyAlias>alias</AndroidSigningKeyAlias>
<AndroidSigningKeyPass>mypass</AndroidSigningKeyPass>
--UPDATED--
This was a problem on the customer's side. He changed the password on the key several times, and one of the options worked.
Windows 10
Firebase
I want to create Firebase project.
So I use this official documentaion:
Manually add Firebase
Steps:
Go to Firebase consle
Click create new project
Create new applications
Select Android
Input name: com.myproject
I need to input debug signing certificate SHA-1:
Here screen:
So I open shell and input:
keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
But I get error:
keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
keytool error: java.lang.Exception: Keystore file does not exist: ~/.android/debug.keystore
java.lang.Exception: Keystore file does not exist: ~/.android/debug.keystore
at sun.security.tools.keytool.Main.doCommands(Main.java:745)
at sun.security.tools.keytool.Main.run(Main.java:343)
at sun.security.tools.keytool.Main.main(Main.java:336)
What is wrong?
In my home folder no file "debug.keystore". So how I can get hash?
Android Studio will do the SHA key generating part to save your time and effort.
You've to find Gradle Project tab somewhere at the right edge of your Android studio. Open it up.
Under your project(root)>Tasks>android, find something called signingReport and run it by double clicking on it.
You will find your SHA1 and MD5 certificates in the Run section, below.
Copy the SHA1 and use it. Otherwise, debug signing certificate SHA-1 is optional in this case, so you can continue without this.
maybe you can try this, go to the right side of your android studio and then double click the signingReport
and you will find the SHA-1 here,
hope this help your problem
Have you tried out this guide as suggested in this solution?
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Edited:
A rather extensive guide on the same topic have been made here. I've personally succeeded with this on Win10 in Android Studio.
I was trying to obtain my Sha1 fingerprint for release and debug. Fortunately, I was able to obtain the debug version code through
keytool -list -alias androiddebugkey -keystore C:\Users\Name.android\debug.keystore -storepass android -keypass android
I was wondering how I would get the release? I tried
keytool -list -alias androidreleasekey -keystore C:\Users\Name.android\debug.keystore -storepass android -keypass android
but unfortunately it came out as keytool error: java.lang.Exception: Alias <androidreleasekey> does not exist.
*Actually my result may have been my released key store since I already built it as released app... I'm not entirely sure though.
You need to find the location of the release keystore file and the name of the alias that you used to build your app.
To do this in Android Studio select Build > Generate Signed APK. You should see a dialog similar to below.
Get the location of the full file path for the release keystore from the Key store path. Then use this path along with the Key alias that is listed to get the SHA1 as you tried previously:
keytool -list -alias myappsalias -keystore
C:\users\dell-laptop\AndroidStudioProjects\myapp\myapp_release.keystore -storepass android -keypass android
someone can tell me why this command
keytool -list -alias androiddebugkey -keystore ~/Desktop/release-1.keystore -storepass android -keypass android
fail with error
keytool error: java.io.IOException: Keystore was tampered with, or password was incorrect.
Where am i mistaken.. please give me an example where i can get MD5 code on mac os.
Try the password as android itself. Maybe it will work. Actually that works for me and i think its the default password for keystore.
This question already has an answer here:
Closed 11 years ago.
Possible Duplicate:
Google Maps does not display any tiles, works fine in developer device
I have gone through whole procedure of getting map api key .But when I enter my Md5 fingerprint it shows invalid .
Could somebody help me.
Is there any other way to get it work?
i think this is right a way to get key ::
To get certificate fingerprint (MD5) follow the simple steps below:
You need to get the keystore file for getting the certificate fingerprint (MD5).
Your keystore file can be found at the following path
"C:\Documents and Settings\\Local Settings\Application Data\Android"
(Or)
"C:\Documents and Settings\.android"
Keystore file name is "debug.keystore" file.
Copy the "debug.keystore" file to some other folder (ex: - "D:\Androidkeystore\") (its user friendly to use).
Open command Prompt and go to the Java installed directory. ("C:\Program Files\Java\\bin")
Then type the below line (given in box) and press enter.
keytool.exe -list -alias androiddebugkey -keystore "D:\AndroidKeystore\debug.keystore" -storepass android -keypass android
Here the MD5 certificate fingerprint is "64:88:A2:FC:AA:9F:B1:B0:CA:E4:D0:24:A8:1E:77:FB"
this is working actually........but im getting small error here
this is my path-C:\ANDROID\Java\jdk1.6.0\bin>keytool.exe -list -alias androiddebugkey -keystore"C:\ANDROID\debugkey\debug.keystore"-storepass android -keypass android
keytool error: java.lang.RuntimeException: Usage error, android is not a legal c
ommand
and finally i have solve from here ::
For more ..
as you got fingerprints copy it and past in Sign Up page. you got a key successfully
if your are using windows do this
C:\>keytool -list -alias androiddebugkey -keystore .android\debug.keystore -storepass android -keypass android
in linux
keytool -list -alias androiddebugkey -keystore /home/.android/debug.keystore -storepass android -keypass android
C:\Program Files\Java\jre6\bin ---> Here key tool is available ------
C:\Users\HB.android\debug.keystore ---> keystore path
// This may be different My UserName is HB so replace with your's
Note:without keytool u cannot get the api key and cannot execute the command
The command goes here ---->
C:\Program Files\Java\jre6\bin> keytool -list -keystore C:\Users\HB.android\debug.keystore
FF:82:84:27:33:43:C1:58:DC:4D:AC:F0:3C:A0:BF:7A
The above is ur MD5 CERTFICATE
http://code.google.com/android/maps-api-signup.html for Registration
Click the above link login and get your api key. Have fun... Happy Mapping
P.S: Dont forgot to extend MapActivity in which you are using the map layout
http://code.google.com/android/add-ons/google-apis/mapkey.html
Click the above link for help