androidgoogle-mapsmapactivity

How to configure Google Maps in Android Studio when creating MapActivity?


Generally created in android studio, a custom application MapActivity, already 4:00 I get it I can not nastroit.V file "google_maps_api.xmp" put the key that was commented above To get one, follow this link, follow the directions and press "Create" at the end: https://console.developers.google.com/flows/enable... You can also add your credentials to an existing key, using this line: D0:27:4F:13:7E:3A:0A:85:36:D5:4D:44:31:DC:6F:8A:02:7E:5C:3B;com.example.dd.map Once you have your key (it starts with "AIz"), replace the google_maps_key string in this file

that's the key "AIz" I bet when you run applications run tools for viewing Google maps (zoom, zoom out), but the card will not run? Maybe it is necessary to connect to the file, and if so, how? And then how to put all the lessons Google maps, but they are all old, and how to configure them is not written anywhere, and they are all old, tell me how to make what they were loaded?


Solution

  • Have you enabled the Android Google Maps API for your app from developers console? https://console.developers.google.com/ ? That should be the first step. You can do that with the code you have pasted. You can replace the API key (starting with "Alz" . Once you do that, the MapActivity will start working. You should also have google play services enabled. Make sure these are mentioned as dependencies in your gradle build files. Check this thread Android Google Mapview Activity not opening in Android Studio