Search code examples
androidgoogle-mapsxamarin.forms

Google Maps API Key not working on new proyect


I am working on integrating some google maps functionality into a Xamarin Forms project, since I haven't found some decent videos on the topic I am using some Microsoft Documentation as a reference for my code. Right now I am trying to display a new Map but I am showed with only a gray box, I know this is caused by the API key not working and the following message in the debug output. output

Here's how I have set up my API key in the Android manifest, I followed the Google documentation

  <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="MyAPIKey"/>

In the demo proyect from the documentation they used another set up, though it doesn`t fix my problem

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

Solution

  • Did you follow the exact steps provided here?https://developers.google.com/maps/documentation/android-sdk/get-api-key#add_key and added your api key in code? your api key should be like and make sure your package name for android is exactly same as mention while creating api key on console.