Search code examples
androidgoogle-mapsapi-key

Google API key isn't working


I am trying to program an android app to contain a google map. I am sure my code is correct because I have checked it a million times and even copied and pasted working code from other people. When I launch the app my app just has a bunch of gray squares. I have tried the API key and the debug KEY.

This is how I retrieve the API key from cmd:

 Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Gateway Owner>cd C:/

C:\>cd Program Files\Java

C:\Program Files\Java>cd jdk1.7.0_02

C:\Program Files\Java\jdk1.7.0_02>cd bin

C:\Program Files\Java\jdk1.7.0_02\bin>keytool.exe -list -alias androiddebugkey -
keystore "C:\Users\Gateway Owner\.android\debug.keystore" -storepass android -ke
ypass android
androiddebugkey, Feb 10, 2012, PrivateKeyEntry,
Certificate fingerprint (SHA1): A5:18:02:AD:2E:C6:0E:02:C5:0A:F6:17:70:5E:31:1A:
AD:A8:81:FA

C:\Program Files\Java\jdk1.7.0_02\bin>

I have seen other screen shots and where I have (SHA1) in parenthesis other people have MD5. Also I have noticed the command prompt gives me a 24 character long number where other people receive 16, and code.google only accepts a 16. I'm starting to feel as though I need to decrypt my MD5 key or something... Please HELP!?


Solution

  • Use following command to get md5,

    C:\Program Files\Java\jdk1.7.0_02\bin>keytool -v -list -alias androiddebugkey -keystore "C:\Users\Gateway Owner\.android\debug.keystore" -storepass android -keypass android