-1

I am currently having trouble adding google maps, direction and places API. I enabled all the API and I have an API browser key which works as I have tested it out.

I was just wondering if anyone is able to help me and resolve the issue I am having. I have checked the manifest file and I have created a string file to hold the API however it brings up an error which I do not understand.

java.lang.RuntimeException: API key not found. Check that <meta-data android:name="com.google.android.geo.API_KEY" android:value="your API key"/> is in the <application> element of AndroidManifest.xml

Mr Lister
  • 45,515
  • 15
  • 108
  • 150
Maddie_J
  • 171
  • 3
  • 15

1 Answers1

1

You need to put this

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

inside <application>, not outside as you currently have.

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141