Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

To Display the Google map on the emmulator

Now I am working on the Google maps API. I am not able to display the map on the emulator as well as the device......... how can i dis play the map.

I tried like this but i failed...

  1. I searched for the debug.keystore in c:/ i found it.
  2. I got Keytool.exe from the "C:\Program Files\Java\<JDK_version_number>\bin".
  3. Opened the commend prompt and went to the above folder.
  4. After that i copied this

"keytool.exe -list -alias androiddebugkey -keystore "C:\android\debug.keystore" -storepass android -keypass android"

and pressed enter then I got the Google api key **:**:**:**:**:**:**:**:**:**:**:**:**:**:**:**

I pasted the key in this site http://code.google.com/android/maps-api-signup.html.

but the map is not generated it is saying that

fingerprint you entered is not valid. Please press the Back button on your browser and enter a valid certificate fingerprint.

What i need to do now to get the Map API key.

like image 642
sita Avatar asked Feb 24 '11 08:02

sita


People also ask

How do I open Google emulator?

Open Emulator Android Studio. Show activity on this post. Click on AVD Manager, new Screen Will appear. So choose emulator if you already have any emulator or Create Virtual device and clone it.


2 Answers

Okay, I was able to solve the problem in my case. I've got Java 7 on my machine and when I followed all the instructions as they are, I've got a SHA1 fingerprint, not MD5. I tried to use it to get the key and received exactly the error message from which this thread has started.

If you are having the same problem, just add the -v option (verbose output) after -list. keytool will then give you the MD5 fingerprint as well - use it.

keytool -list -v -alias androiddebugkey -keystore C:\Users\<user>\.android\debug.keystore -storepass android -keypass android

I will try to let Android folks know that they need to update the page with instructions.

like image 74
Alex Avatar answered Oct 11 '22 16:10

Alex


for JDK 1.7 you get SHA1 fingerprint by default. But for generating Google Map API key you need fingerprint of MD5. For more details navigate through the below link.

How can I get the MD5 fingerprint from Java's keytool, not only SHA-1?

like image 43
Seenu69 Avatar answered Oct 11 '22 14:10

Seenu69