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.
Related
i am trying to create google login app in which i need Android Signing Certificate SHA-1.
At the starting there is .android folder in which contain two other files
but those are not debug.keystore so i read somewhere on stackoverflow they
said delete .android folder its will automatically created when rebuild the
project so i did it but it not created any .android folder or debug.keystore
i tried various command its giving only error given below
C:\Program Files\Java\jdk1.8.0_65\bin>keytool -list -v -keystore
"C:\Users\kulde\.android\debug.keystore" -alias androiddebugkey -storepass
android -keypass android
keytool error: java.lang.Exception: Keystore file does not exist:
C:\Users\kulde\.android\debug.keystore
java.lang.Exception: Keystore file does not exist:
C:\Users\kulde\.android\debug.keystore
at sun.security.tools.keytool.Main.doCommands(Main.java:742)
at sun.security.tools.keytool.Main.run(Main.java:340)
at sun.security.tools.keytool.Main.main(Main.java:333)
Instead of using debug.keystore which is less secure use your own created keyStore. Follow this to do the same
After you created your keystore, run the following command in terminal of Android studio.
keytool -list -v -keystore "path where .jks file is stored"
After this terminal will ask for password which you have created in above step.
Finally you will get your SHA-1 certificate.
Make sure you store your keystore safely. It will be used in future when you upload your App.
There is no debug.keystore in .android folder
The debug.keystore is created automatically on first build that uses it.
or
According to the documentation, performing a build in Eclipse or using ant debug should automatically generate ~/.android/debug.keystore.
But in case this doesn't work, you can create one manually by running:
keytool -genkey -v -keystore ~/.android/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"
This question already has answers here:
How to get the SHA-1 fingerprint certificate in Android Studio for debug mode?
(47 answers)
Closed 7 years ago.
I get many tutorial for generate SHA-1 fingerprint (in general not just for maps) , but I want know whats the best way & what difference between this ways .
First way (keytool)
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
Or by mention userprofile
keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
Second way (From Eclipse )
Window > Preferences > Android > Build
Thank you in advance & sorry for disturb
Try like this
first you can download and instal openssl and jdk file.
open command prompt and copy and paste jdk file path like this
C:\Program Files\Java\jdk1.6.0_37\bin>
Next Go to C:>User folder>Select (User name) folder> .android folder is there open that folder and copy the link
(or)
type the text line like this
keytool -list -v -keystore "C:\Users(user name).android\debug.keystore"
C:\Program Files\Java\jdk1.6.0_37\bin>keytool -list -v -keystore "C:\Users(user name).android\debug.keystore"
Enter keystore password: android
and click enter
list out the sha1 and md5 keys.
So I am trying to do a map application on android.
I wrote this code on my mac os terminal to create Certificate fingerprint
keytool -list -alias androiddebugkey -keystore ~/.android/debug.keystore -storepass android -keypass android
code generate:
(MD5): C9:C1:40:66:40:07:D0:8C:FF:44:A3:7D:F4:73:57:4B
I don't know why but code generate MD5 not SHA-1
and I understand I need 20 character finger print but my terminal generated 16 character.
if my fingerprint is wrong how can I create true one. If its true than how can I create Api key for map from developer.google.com
If do you have any clue please help. Thanks
Add -v in the end of the keytool command that you gave. It might look something like this.
keytool -list -alias androiddebugkey -keystore ~/.android/debug.keystore -storepass android -keypass android -v
UPDATE:
I answered somewhat related problem like this before, you might get an idea from it if my answer is not enough for you. :)
How to/Error in declaring google-play-services-component
Install plug in eclipse
http://keytool.sourceforge.net/update
Go to eclipse -> Help -> Install new software paste above link
and install it
and then open keytool in ecipse open keystore option will be provided
it will give you SHA1 finger print.
(keytool window will be opened beside errorlog and logcat
click drop down and then androiddebugkey click it you will have all the info there)
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
I'm trying to generate the MD5 fingerprint from the debug.keystore file using keytool.exe in my JDK so I can use Google Maps in my Android project.
I've located the keystore file and have moved it into C:\android just to make things easier.
Then in a command prompt I type
c:\Program Files\Java\jdk1.5.0_13\bin>keytool -list -alias androiddebugkey -keystore "C:\android\debug.keystore" -storepass android -keypass android
And I keep getting the error:
keytool error: java.lang.Exception: Keystore file does not exist: C:\android\debug.keystore
I've also tried entering the keystore in from its original location rather than moving to c:\android but I still get the same error.
Does anyone have any idea why this is happening?
Also, is there any other way to get this MD5 fingerprint? Some program maybe?
to generate debug.keystore file
in Eclipse/ADT, go to Windows > Preferences > Android > Build
once it is generated use ur command(c:\Program Files\Java\jdk1.5.0_13\bin>keytool -list -alias androiddebugkey -keystore "C:\android\debug.keystore" -storepass android -keypass android) to generate MD5.
this is used to generate api key for google map.
You should execute the keytools from c:\Program Files (x86)\java\jre6\bin>
And here execute the keytool command without "\"
keytool -list -alias androiddebugkey -keystore C:\Users\<you_user_name>\.android\debug.keystore -storepass android -keypass android
It will work!
You might try adding c:\Program Files\Java\jdk1.5.0_13\bin to your PATH, then running the keytool command from the C:\android directory. That's what I do (more or less -- I have JDK6 and a different directory), and it works fine.
There are times when your .android folder is present in the C:\Documents and Settings path. Often, because of the spaces in Documents and Settings, the command will not run properly.
It's better if you just create a test folder under C: and put your debug.keystore file in this folder. Then give the path as:
keytool -list -alias androiddebugkey -keystore "C:\test\debug.keystore" -storepass android -keypass android
This works. If somebody is facing issues and getting an error on this command, you can try your luck with this.
I had the same message and when checking the C:\user.android directory could see that the debug.keystore file was not present. As this was the first time I'd tried an android project on this machine, there had been no previous builds. I created and ran the ubiquitous 'Hello World' project and debug.keystore was instantly created. I then ran keytool and the MD5 appeared fine
To generate the debug.keystore, you have to run any app at least one time. Just create and run any simple "Hello World" android app to generate it.
Create Hello World android App
Run Hello World android app
keytool error: java.lang.Exception: Keystore file does not exist: C:\android\debug.keystore
Tells me that file isn't there like you think it is.
Also, if you are using the Eclipse Android tools, you can export a signed APK file via Eclipse, which might be easier for you than using the command line tools.
First i wentto the bin directory and then
get where your debug.key is ..mainly at the .android and it worked like a charm
where androiddebugkey is the name you give
C:\Program Files\Java\jdk1.8.0_66\bin>keytool -exportcert -list -v -alias androiddebugkey -keystore C:\Users\001557\.android\debug.keystore