-2

I integrated Google Maps in my Android app using the maps api but when I launch it stays blank and also showing the Google Logo(see picture). this is what the app shows

In builde app gradle I have:
dependencies{
implementation 'com.google.android.gms:play-services-maps:11.0.4'
}
apply plugin: 'com.google.gms.google-services'

In manifest.xml I have:

<uses-permission android:name="com.vallabh.googlemapspractice.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="The Api Key which I got from google console" />
Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
CanciuCostin
  • 1,773
  • 1
  • 10
  • 25
  • Check the logcat,if there is any error message or so;like invalid apikey – Soham Jan 17 '18 at 11:48
  • Have you looked at [32841721](https://stackoverflow.com/questions/32841721/) or [45550412](https://stackoverflow.com/questions/45550412/)? Is your API key enabled and can you see any traffic hits on your Google Cloud Platform dashboard for that API? – dylan-myers Jan 17 '18 at 11:51
  • First of all you hould follow the newest documentation ... I'm sure that when you are using gradle's *google-service plugin* there is no need for `"com.google.android.geo.API_KEY"` ... but you have to check what is really needed(how to setup) – Selvin Jan 17 '18 at 12:02
  • I got rid of this problem by reinstalling Android Studio. – CanciuCostin Jan 19 '18 at 07:45

1 Answers1

0

if you use android studio try this, it's easy to solve problem here android studio doing lot of steps auto.

Create new google map activity

  • File -> New -> Google -> Google Maps Activity.

find the google_maps_api.xml file

Follow TODO steps Before you run your application, you need a Google Maps API key.

Thamays
  • 2,978
  • 26
  • 31