Problem with Google Maps V2 on android SDK

Asked

Viewed 347 times

3

I’m getting this error in my Android project using google maps V2 API:

    02-24 11:18:03.627: D/memalloc(24852): /dev/pmem: Mapped buffer base:0x53e95000 size:2949120 offset:2334720 fd:51
02-24 11:18:04.527: E/Random(24852): > 17.386018618908807, 78.48646956337022
02-24 11:18:04.557: E/Random(24852): > 17.38412543640696, 78.48624683166463
02-24 11:18:04.587: E/Random(24852): > 17.38586197038353, 78.4868721802265
02-24 11:18:04.607: E/Random(24852): > 17.38442155970874, 78.48580890457683
02-24 11:18:04.627: E/Random(24852): > 17.384699149953665, 78.4870218788892
02-24 11:18:04.647: E/Random(24852): > 17.385163909742342, 78.48621221061424
02-24 11:18:04.667: E/Random(24852): > 17.385114499391356, 78.4873707292564
02-24 11:18:04.687: E/Random(24852): > 17.385180855826714, 78.48744879889605
02-24 11:18:04.717: E/Random(24852): > 17.385454853045843, 78.48692191930289
02-24 11:18:04.737: E/Random(24852): > 17.385926863638797, 78.48699800017822
02-24 11:18:04.757: E/GooglePlayServicesUtil(24852): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
02-24 11:18:04.867: D/memalloc(24852): /dev/pmem: Mapped buffer base:0x53b95000 size:1187840 offset:573440 fd:96
02-24 11:18:04.967: D/memalloc(24852): /dev/pmem: Mapped buffer base:0x5474f000 size:1720320 offset:1187840 fd:102
02-24 11:18:04.987: D/memalloc(24852): /dev/pmem: Mapped buffer base:0x548f3000 size:6021120 offset:5406720 fd:105
02-24 11:18:05.167: D/memalloc(24852): /dev/pmem: Mapped buffer base:0x54eb1000 size:6635520 offset:6021120 fd:108
02-24 11:18:05.167: D/memalloc(24852): /dev/pmem: Unmapping buffer base:0x5429f000 size:4915200 offset:4300800
02-24 11:18:05.167: D/memalloc(24852): /dev/pmem: Unmapping buffer base:0x51a02000 size:2334720 offset:1720320
02-24 11:18:05.167: D/memalloc(24852): /dev/pmem: Unmapping buffer base:0x53e95000 size:2949120 offset:2334720
02-24 11:18:05.517: D/memalloc(24852): /dev/pmem: Mapped buffer base:0x54265000 size:4833280 offset:4300800 fd:45
02-24 11:18:05.527: D/memalloc(24852): /dev/pmem: Mapped buffer base:0x53e95000 size:2252800 offset:1720320 fd:48
02-24 11:18:11.727: E/Google Maps Android API(24852): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).
02-24 11:18:47.077: D/memalloc(24852): /dev/pmem: Unmapping buffer base:0x5474f000 size:1720320 offset:1187840
02-24 11:18:47.077: D/memalloc(24852): /dev/pmem: Unmapping buffer base:0x54265000 size:4833280 offset:4300800
02-24 11:18:47.077: D/memalloc(24852): /dev/pmem: Unmapping buffer base:0x53e95000 size:2252800 offset:1720320

Already includes the lib google_play_serv in my project. I’m also running the project on a real device. I’m using it as a base: http://www.androidhive.info/2013/08/android-working-with-google-maps-v2/inserir a descrição da imagem aqui

  • Please enter more information about the full context, code and/or stacktrace.

  • I think I will included wrong the google play lib of a checked ai. Also checks if the key generated ta correct (package name at the end of the SHA). With the information you gave the most error I think it might be one of those two things.

  • Includes this lib : sdk extras google google_play_services now it says I don’t have authorization E/Google Maps Android API(4384): Authorization Failure. from what I saw has two keys one for debug is one for production I think my problem

  • Exact. Retraces the step of generating the SHA and picking up the Key on google. If you are testing the APP in debug yet, you use debug.key. Go to Window -> Pereferens -> Android -> Build. In this window you will have the SHA of your key, with this sequence of characters you will generate the Key in google.

  • After trying everything I decided to redo the manifest, I do not know exactly what part was the error, but solved. Anyway thanks for the help!

1 answer

1


There are two things in your logcat that may indicate your problem.

02-24 11:18:11.727: E/Google maps Android API(24852): Failed to load map. Error contacting Google Servers. This is probably an Authentication Issue (but could be due to network errors).

You probably didn’t set up the access key to the API or reported wrong, access the Google API Console check the keys.

also check if you have set the required tags on your Androidmanifest.xml in the element application

<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="digite sua API_KEY"/>

Note: Ran some cases I had to wait a few minutes for the keys to be used.

02-24 11:18:04.757: E/googleplayservicesutil(24852): The Google Play services Resources Were not found. Check your project Configuration to ensure that the Resources are included.

This means that you have not made a reference to the Resources project of google maps, such as images, layouts, etc. To solve this problem you have to download and reference the Google Play Service Project along with your project, for such procedure you have to access the google play service setup tutorial

Source and full tutorial on Google Maps Android API Documentation

  • My problems were in the manifest after redoing it, it worked correctly! Thank you.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.