title: Xamarin.Forms GoogleMaps - : 'API key not found. check that ... is an element of AndroidManifest.xml
body: <p>Hello StackOverFlow community,</p>
  <p>I'm following a course on Pluralsight titled 'Integrating Google Maps into Xamarin.Forms Apps'.</p>
  <p>I've followed all of the steps required - and I've just added the maps control. I've configured the maps on my Android file as you can see below:</p>
  <pre><code>using System;
  
  using Android.App;
  using Android.Content.PM;
  using Android.Runtime;
  using Android.Views;
  using Android.Widget;
  using Android.OS;
  
  namespace standard.Droid
  {
      [Activity(Label = &quot;standard&quot;, Icon = &quot;@mipmap/icon&quot;, Theme = &quot;@style/MainTheme&quot;, MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize )]
      public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
      {
          protected override void OnCreate(Bundle savedInstanceState)
          {
              TabLayoutResource = Resource.Layout.Tabbar;
              ToolbarResource = Resource.Layout.Toolbar;
  
              base.OnCreate(savedInstanceState);
  
              Xamarin.FormsGoogleMaps.Init(this, savedInstanceState); // configured here
  
              Xamarin.Essentials.Platform.Init(this, savedInstanceState);
              global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
              LoadApplication(new App());
          }
          public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
          {
              Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
  
              base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
          }
      }
  }
  </code></pre>
  <p>Manifest file:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;manifest xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot; android:versionCode=&quot;1&quot; android:versionName=&quot;1.0&quot; package=&quot;com.companyname.standard&quot; android:installLocation=&quot;preferExternal&quot;&gt;
      &lt;uses-sdk android:minSdkVersion=&quot;21&quot; android:targetSdkVersion=&quot;28&quot; /&gt;
      &lt;application android:label=&quot;standard.Android&quot; android:theme=&quot;@style/MainTheme&quot;&gt;&lt;/application&gt;
      &lt;uses-permission android:name=&quot;android.permission.ACCESS_NETWORK_STATE&quot; /&gt;
      &lt;uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot; /&gt;
      &lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot; /&gt;
      &lt;uses-permission android:name=&quot;android.permission.ACCESS_LOCATION_EXTRA_COMMANDS&quot; /&gt;
      &lt;uses-permission android:name=&quot;android.permission.ACCESS_MOCK_LOCATION&quot; /&gt;
      &lt;uses-permission android:name=&quot;android.permission.ACCESS_WIFI_STATE&quot; /&gt;
      &lt;uses-permission android:name=&quot;android.permission.INTERNET&quot; /&gt;
      &lt;application android:label=&quot;standard.Android&quot;&gt;
          &lt;meta-data android:name=&quot;com.companyname.standard&quot; android:value=&quot;(my api key)&quot; /&gt;
      &lt;/application&gt;
  &lt;/manifest&gt;
  </code></pre>
  <p>I've generated my keystore - I've followed all of the steps as required. And I get this message:</p>
  <pre><code>: 'API key not found.  Check that &lt;meta-data android:name=&quot;com.google.android.geo.API_KEY&quot; android:value=&quot;your API key&quot;/&gt; is in the &lt;application&gt; element of AndroidManifest.xml
  </code></pre>
  <p>This is my XAML code:</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot; ?&gt;
  &lt;ContentPage xmlns=&quot;http://xamarin.com/schemas/2014/forms&quot;
               xmlns:x=&quot;http://schemas.microsoft.com/winfx/2009/xaml&quot;
               xmlns:maps=&quot;clr-namespace:Xamarin.Forms.GoogleMaps;assembly=Xamarin.Forms.GoogleMaps&quot; 
               x:Class=&quot;standard.MainPage&quot;&gt;
  
      &lt;StackLayout&gt;
          &lt;maps:Map /&gt;
      &lt;/StackLayout&gt;
  
  &lt;/ContentPage&gt;
  </code></pre>
  <p>I've got no idea why this is happening - I've followed instructions as needed. Maybe I am missing something?</p>
  <p>And yes this seems to be related to Google Maps as when I remove the XAML code it works perfectly.</p>
  <p>Again, I get this message:</p>
  <pre><code>: 'API key not found.  Check that &lt;meta-data android:name=&quot;com.google.android.geo.API_KEY&quot; android:value=&quot;your API key&quot;/&gt; is in the &lt;application&gt; element of AndroidManifest.xml
  </code></pre>
  <p>Thanks,</p>
  <p>tommy99</p>
  <p><strong>EDIT: and for anyone saying 'oh put it in an application element', here's my reponse: yes I've tried that and it still is not working...</strong></p>