0

I have created an api key , put the package name and SHA1 fingerprint in the google developers console aand enabled the google maps api.No matter how many times I regenerate a key I keep getting a blank screen on devices . It only works when I run the app directly to my tablet. The errors ( taken from instabug console)

9-19 16:26:13.762 E/Google Maps Android API(28700): Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map. 09-19 16:26:13.772 E/Google Maps Android API(28700): In the Google Developer Console (https://console.developers.google.com) 09-19 16:26:13.772 E/Google Maps Android API(28700): Ensure that the "Google Maps Android API v2" is enabled. 09-19 16:26:13.772 E/Google Maps Android API(28700): Ensure that the following Android Key exists: 09-19 16:26:13.772 E/Google Maps Android API(28700): API Key: YOUR_KEY_HERE 09-19 16:26:13.772 E/Google Maps Android API(28700): Android Application (;):

Chad Precilla
  • 37
  • 1
  • 9
  • Did you do this? "Copy the resulting API key, go back to Android Studio, and paste the API key into the element in the google_maps_api.xml file." – Eugen Pechanec Sep 19 '15 at 23:39

2 Answers2

0

Make sure you're putting in the header of the HTML/PHP

<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=APIKEYHEREONLY&sensor=false"></script>
Levi
  • 81
  • 13
  • I apologize, I didn't see that this is for Android API. Thought it was for Web based. – Levi Sep 19 '15 at 23:40
0

Your issue might be that the SHA1 fingerprint that you are putting in the Google Developer Console is the one for your debug version. Given that you have to generate a new certificate for release apk, you need to get the new SHA1 fingerprint corresponding to release APK and then put that in the Google Developer console. If I am not mistaken the debug log should also mention the SHA1 fingerprint instructing you to make sure that the SHA1 fingerprint is entered in your google developer console.

If the debug log doesn't print the required error, then you can use this to generate the SHA1 fingerprint.

Community
  • 1
  • 1
nik-v
  • 753
  • 1
  • 9
  • 20