Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Wednesday, August 31, 2016

Google Maps API V2 - always get authentication error

Google Maps API V2 - always get authentication error


I found lots of questions regarding this - and I am almost ashamed to ask it myself.

But no matter how hard I try, I simple do not get the Maps API running at all!

Not with the demo project, com.example.mapdemo, not with my own project.

I definitely have my debug.keystore SHA1 fingerprint registered, now for both my app and com.example - I also tried the browser API key where everybody says that would work, too.

BUT NO.

I always get:

06-16 11:21:29.860: E/Google Maps Android API(2382): Authorization failure.  Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.  

I am getting REALLY, REALLY mad at this. How is it possible to NOT completely and thoroughly describe this matter so that people that are otherwise able to program Android apps, can follow and succeed??

HOW?

Could anybody please tell me what else could be wrong?

Add-on: I set up everything exactly according to the specs, got my key from my debug.keystore, tried it with com.example for the maps demo, with my own package for my app. Does not work. Plus: that silly empty window. How on earth is that gonna work... :-(

Answer by ddewaele for Google Maps API V2 - always get authentication error


Assuming

  • you are trying this on a device that has access to Google Play Services
  • you have linked your project with the Google Play Services library
  • you have setup the necessary permissions like this:

snippet from manifest:

                                                
  • you have setup the map key like this :

enter image description here

  • you have put the meta-data tag

inside the application tag

  
  • you made sure that you are building the APK with the correct keystore (corresponding to the one defined in the API console).

  • you removed and redeployed your application completely after checking / updating these steps you should be good to go.
  • From my experience I was able to follow the instructions on Google Maps Android API v2 Getting started, but I do recall having to completely undeploy and redeploy the app again after playing around with the API keys / permissions.

    On what device are you running ?

    Answer by AlAsiri for Google Maps API V2 - always get authentication error


    I am also having the same issue and know I kinda know what causes the problem ( not the solution to it though -yet- )

    Try to run your app of other phone than your HTC One. Because I have the issue with my HTC One but when I run it on my S3, it runs perfectly.

    Try and let me know please

    EDIT

    I solved it. But not sure what was the exact solution but here what I did as steps: 1- I displayed the developers options in the phone settings use the 7 times clicks in 4.2 OS 2- Allowed Mock Location 3- Selected my app in the "select debug app" 4- uninstalled my app 5- re-installed it 6- run it and waited for 30 seconds then the maps showed

    Hope this helps

    Answer by S.P.Karthick for Google Maps API V2 - always get authentication error


    I was having the same problem , then i found out that i had made a simple mistake please verify whether you have turned on "Google Maps Android API v2" in services catagory of google api console . I had turned on the wrong one it never worked for me , but now it works, hope this helps. https://code.google.com/apis/console

    Answer by piotrpo for Google Maps API V2 - always get authentication error


    I had got same issue. After checking 20th time the steps from ddewaele's answer, turning on the Maps V2 android in Google's API console, I have restarted my phone, waited ~15s for data to download and all works like a charm. Uninstalling application was not enough to get it working. Just leaving info for other map using devs on the edge.

    Answer by user2235057 for Google Maps API V2 - always get authentication error


    Even I was facing the same issue for days. I simply uninstalled the app from settings, reinstalled it and magically it worked.

    Answer by shahzad afridi for Google Maps API V2 - always get authentication error


    i have same problem i spent two weeks to get a solution at last i got it. just remove key from res/values/google_maps_api.c and repalace it by new key follow below steps you will get a new key.

    1> Find SHA1 by Using that command in command prompt:    keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android    2> Get Package name from android manifest and use finger print of SHA1 for create an new api key       3> copy created key and past it in res/values/google_maps_api.xml and also past in android manifest     Paste Here New Api        


    Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

    Related Posts:

    0 comments:

    Post a Comment

    Popular Posts

    Fun Page

    Powered by Blogger.