Google map may appear on the emulator, but not on the Android device

I have already received the Google map API key to run on the emulator, but when I run the program on a real Android device, Map does not appear. I read some of the solutions that said I should get a key from Google, but that does not tell me HOW can I get this key

+6
android android-emulator google-maps google-maps-api-3
source share
2 answers

It's not just about the Android application key store or the Android Maps API Key. This is a combination of both. We need a keystore when we want to sign the application.

How you can sign an application is to follow; (I give instructions, assuming you are working with the Eclipse IDE)

  • Right-click your project in the package explorer window.
  • Android Tools β†’ Export Signed Application Suite
  • In the "Project Verification" window, run the project and go to the next window.
  • Select "Create a new keystore" and follow the instructions in the wizard
  • Do not specify the default password that comes with the debug Eclipse key

You can then finish creating the signed key for your application. The next procedure is the Android Maps API keyword registration process. Here, I assume that you are running an implementation in a Windows environment.

  • Open command prompt
  • Go to the place where you saved the keystore file in the previous process.
  • Enter the command "keytool -list -keystore keystore.filename" with quotes
  • They will ask for a "keystore password", provide the same password that was specified when creating the keystore
  • Then you can get the MD5 key
  • Copy it and follow the link

Give the MD5 key in the appropriate place, check the box. Then the Google people will provide you with the XML code. You must paste this code into the XML file where you need to load the map.

Bingo ... now you have created an application that supports the Google Maps API, which works both on the emulator and on a real device. :-)

+2
source share

Create a new key-store , get the Api key again and use the new key.

+1
source share

All Articles