I have Google Maps in my Android App. I added it by selecting new Google Maps Activity & pasting the key in Android Studio. It worked fine in my Android phone (Lenovo K5
Fought with blank map past two days and here is the summary (which I'm sure is not a complete list of possible issues!) collected from various sources.
Seems to be most often. I recommend to follow official documentation. If you finish all steps, issue persists and you're still unsure whether it could be the reason, clone official android samples, find the MapWithMarker sample (android-samples/tutorials/MapWithMarker) and test against it. If you run the sample and it shows the map correctly, try to exchange default API KEY for the one you own.
In such case make sure, you enabled it in Google API Console.
Your AndroidManifest.xml needs to define following metadata attribute:
See the answer here for more details and official documentation.
In older versions of Android SDK, you had to explicitly set certain user permissions to work with Google Maps API correctly, for example:
This is not the case anymore but I would recommend to visit official documentation to make sure you meet those version requirements.
In the past, there seemed to be requirement to specify following metadata attribute within AndroidManifest.xml
This shouldn't be required anymore per official documentation. Some additional details are available e.g. here.
Android Studio 3.0 AVD Manager allows you to create device configurations for APIs that don't seem to be working well. At the moment, you can create configuration against API v27 which doesn't seem to be released yet if I'm not mistaken. Basic emulations worked well even there until I started work with Google Maps API. None of the device configurations set to v27 worked with Maps API resulting in blank map.
Note: Would be happy if anyone with deeper knowledge correct my simplified and probably incorrect interpretation. Since this was my problem, I stopped evaluating deeper and simply switch to different configuration for now.
Using following setup:
Android Studio 3.0
Build #AI-171.4408382, built on October 20, 2017
JRE: 1.8.0_152-release-915-b01 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
Hope this will help at least one person to save some time..