API Key not found when adding Google Maps to Flutter

If you place the <meta-data> tag in the wrong location at first, lets say in the <activity> tag.

  1. You need to run "flutter clean" which cleans up the android and ios build directories.

  2. Then ensure you create the <meta-data> tag right above the </application> tag.

You should be good to go. I ran into this issue and it worked for me. Found the answer on github issues.


You've currently got the meta-data element as part of the activity. The documentation says to make it a child of the application:

In AndroidManifest.xml, add the following element as a child of the <application> element, by inserting it just before the closing </application> tag

So I suggest you try moving it to just after </activity>.