Google maps v2: Authorization failure
For me help this, if simple: When you work from Android Studio you write your Google API key in file google_maps_api.xml but Android Studio show you only key file for (debug) version in Project Manager. You need place your key in
\app\src\release\res\values\google_maps_api.xml
file too (like you place in place your key in
\app\src\debug\res\values\google_maps_api.xml
)
Activate the Google Maps Android API v2
service in the Google API's console
. Also, after making changes do a full reinstall of the app on the device/emulator.
When you set up your API key, the package name is the value of the package
attribute on your manifest
, not the application name.
This (com.foo
):
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.foo"
Not this (com.foo.MyApplication
):
<application
android:name="com.foo.MyApplication"