Cannot get SHA1 certificate fingerprint Android Studio [duplicate] - android

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'm very new in Android, i'm building an app what will uses the googleMaps API, before i can use it, i need SHA1 certificate fingerprint, i follow many tutorials to get SHA1 certificate fingerprint and this displayed on my commandPrompt:
(sorry i'm not allowed to post an image here) :
Lists entries in a keystore
options:
-rfc output in RFC style
-alias <alias> alias name of the entry to process
-keystore <keystore> keystore name
-storepass <arg> keystore password
and e.t.c...
after i go into bin folder inside java\jdk 7\
and ran this command:
eytool -list -v -keystore C:\Users\leon.android\debug.keystore -alias androiddebugkey -storepass android -keypass android

The easiest way to do this (for debugging) is to run the app in debug connected to Android Studio. Check the messages (logcat) in Android studio and you'll see a message, in red "Unable to connect Google Maps: Authorisation Failure" and then underneath that will be the exact string you need to copy into the Google API Console (SHA1 + app name). Copy, paste, wait a bit for Google to spread to all the servers and then try again.
Otherwise, you just need to run
keytool -list -v -keystore mystore.keystore
(No need for the other parameters) and it's the entry under SHA1 that you need.

Related

xamarin -keystore and apk have sha1 is different

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.

Difficulty in Obtaining an API key for Google Maps

I am following the instructions in this tutorial https://web.stanford.edu/class/cs193a/lectures/maps.pdf
I get the command prompt to C:\Users\USERNAME.android (for windows new)
I then type >keytool -list -v -keystore debug.keystore
but when I press Enter I get:
What is going wrong? It seems like I have not set something up quite correctly, because I have followed the instructions which didnt seem difficult.
1. Open Terminal In Android Studio you are running.
2. Enter: keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
3. Copy SHA1 key.
4. Go To Google developer console and select Android API Key.
5. Copy SHA1 key to android Fingerprint and Write Package in Package Name block.
6. Generate API key.
7. USE API key

Google map reporting invalid key in Android

I got the SHA-1 fingerprint from using the keytool for my application on my key that I sign the application with when I upload it to the play store.
But when I open the app on my phone for testing it says it is not the right key. ANy ideas what I could be doing wrong?
Not sure what more information i can give without giving security info for my app, so if you can help give me anymore information that I can not think of please let me help you help me.
First for the development generate a SHA-1 from debug.keystore:
Navigate to C:\Program Files\Java\jdk1.6.0\bin>..... where your bin located then execute below command
C:\Program Files\Java\jdk1.6.0\bin>keytool -v -list -alias androiddebugkey -keystore "D
:debug.keystore" -storepass android -keypass android
or
C:\Program Files\Java\jdk1.6.0\bin>keytool -v -list -alias androiddebugkey -keystore "C:\Documents and Settings\user1\.android\debug.keystore" -storepass android -keypass android
Now, you can get one SHA-1 certificate and generate API key from Google API console. Add this key into your manifest.xml file. remember this API key only for the development. Using this key built apk u can not publish into market.
Now, turn to make your own keystore: execute below command
C:\Program Files\Java\jdk1.6.0\bin>keytool -genkey -v -keystore OWN.keystor
e -alias ALIASNAME -keyalg RSA -keysize 2048 -validity 300000
and give all the required details for this keystore. Now time to generate SHA-1 from your OWN.keystore execute below commnad
C:\Program Files\Java\jdk1.6.0\bin>keytool -v -list -alias ALIASNAME -keystore "C:\Program Files\Java\jdk1.6.0\bin\OWN.keystore" -storepass PASSWORD -keypass KEYPASSWORD
Now, you can get one SHA-1 certificate and generate API key from Google API console. Replace this key into your manifest.xml file. Now your app is ready to publish into market.
This may helpful to you.
Have you tried to completely remove the application and then install it all over again. This key might be got cached and even if you install the application with new key.
So before you install your application with the new key, try to remove the application completely from the phone.
You can as well go over this blog post I wrote and make sure you do all the steps right in producing the key:
Google Maps API V2 Key

How to get Map api key? [duplicate]

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

error getting the md5 fingerprint [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Android:Google Maps API Key Signup : MD5 certification key
I want to display the google maps. For that I have to generate md5 fingerprint.
I have to run command as follows:
keytool.exe -list -alias androiddebugkey -keystore "C:\android\debug.keystore" -storepass android -keypass android
I got this error
keytool.exe -list -alias androiddebugkey -keystore "C:\android\debug.keystore" -storepass android -keypass android
Please help me. Is there any other way to get the md5 finger print? Thanks in advance.....
Java's documentation on this tool is bad. I had a heck of a time figuring it out and created a walkthrough for myself in case I ever needed to do it again. It makes sense to me, hopefully it makes sense to the world.
I use Java version 1.6 and assume this should work for whatever version you have but you'll just have to change the version numbers in your file folders.
1) open command prompt
2) change directories to this directoy: C:\Program Files\Java\jdk1.6.0_26\bin
3) copy paste this (obviously change Dude with your curent windows username)
keytool.exe -list -alias androiddebugkey -keystore "C:\Users\Dude\.android\debug.keystore" -storepass android -keypass android
4) MD5 will be displayed in this pattern where X can be a number or letter:
XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:
5) Go here: http://code.google. com/android/maps-api-signup.html
6) follow steps and your apikey will be generated will look something like this:
(fyi I just mashed a bunch of keys to create the string shown below)
From Google Web API Key Tool
Your key is:
93dn23o812dsm19021087ry2f823o8fn3f0vkTL
This key is good for all apps signed with your certificate whose fingerprint is:
XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:
Here is an example xml layout to get you started on your way to systemic mapping glory:
<com.google.android.maps.MapView
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:apiKey="93dn23o812dsm19021087ry2f823o8fn3f0vkTL"
/>

Categories

Resources