0

I've create key for android application , and set the debug sha1 from key store debug which android studio should use.

I extract the sha1 using this command :

keytool -list -v -keystore debug.keystore -alias androiddebugkey -storepass android -keypass android

I double check that I set correctly the key and the package name at the google developer. and also delete the key and generate another one, but that doesn't help, google maps deosn't appear.

please notice that my production app work perfect.

What may be the problem ?

EDIT: logcat show this:

Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).

SOLVED: I forget to enable the map api at the google project console, the log cat doesn't doesn't show this problem.

david
  • 3,310
  • 7
  • 36
  • 59
  • What's the logcat saying? there must be something regarding to the Map. – theapache64 May 13 '15 at 15:34
  • As the logcat saying, probably the error produced by the SHA-1 Key. Try generating SHA1 using this `keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android `. am not sure about the response, tell me if it workd. – theapache64 May 13 '15 at 15:41
  • @ShifarShifz it generates the same key – david May 13 '15 at 15:46
  • Is your app perhaps pointing to release and not to debug? In this case you have to put SHA-1 key of your keystore file. – Giorgio Antonioli May 13 '15 at 15:46
  • it'll be better, if you look at this tutorial http://www.androidhive.info/2013/08/android-working-with-google-maps-v2/ – theapache64 May 13 '15 at 15:47
  • first goto eclips click on window then click prefrence on the right side click on android on the Build setion there will be shah1 using this may be it work for u – Mushtaq Rahim May 13 '15 at 15:49
  • @Fondesa How could I know if it's point to debug or release, it should point to debug buecause i run it using android studio , right ? – david May 13 '15 at 15:50
  • @MushtaqRahim it is the same key that I get using command line – david May 13 '15 at 15:52
  • @david Not really, i think that you in your android studio are pointing to debug, because you have to create an unsigned apk to run in release version. – Giorgio Antonioli May 14 '15 at 08:41
  • http://stackoverflow.com/questions/17491400/failed-to-load-map-error-contacting-google-servers-issue-with-android-google-ma. similar question. Let me know if any of the answers helped? – Kay_N May 15 '15 at 00:09
  • @KayAnn thank you for your comments, I solved the problem , I forget to enable the map api at google developer console – david May 15 '15 at 08:57

1 Answers1

1

When I had this issue, it was because the package name I entered in the developer console to get the key was different from the package name of my application. Please ensure that they are the same

Javed Ali
  • 1,510
  • 2
  • 12
  • 18