Authorization Failure with Google Map API key
10,312
Solution 1
problem solved.. i had to uninstall the app, and do a project clean, then re-install the app.. don't know why exactly but now its working
Solution 2
Your API key in your manifest clearly does not match the API key you posted that is showing in the API console. Paste the API key from the console into the manifest. Should fix you right up.
Author by
erik
Updated on June 04, 2022Comments
-
erik almost 2 years
I am building a project for android 4.3 and building to an actual device but my google map always shows up empty and i get an authorization failure.. But everything checks out..
I have a network connection..
LOG ERROR
GOOGLE API CONSOLE
SERVICES IN CONSOLE
My Manifest
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.sapientnitro.inhouse.drop" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="17" android:targetSdkVersion="18" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <permission android:name="com.sapientnitro.inhouse.drop.activities.permission.MAPS_RECEIVE" android:protectionLevel="signature" /> <uses-permission android:name="com.sapientnitro.inhouse.drop.activities.permission.MAPS_RECEIVE" android:required="false" /> <uses-feature android:glEsVersion="0x00020000" android:required="true" /> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" > <uses-library android:name="com.google.android.maps"/> <activity android:name=".activities.DRPSplashActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name=".activities.DRPMapViewActivity" android:launchMode="standard" android:screenOrientation="portrait" /> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyA7tcgqzYWAcqLd0ea5qAqHYpaYKTHQv5s" /> <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" /> </application> </manifest>
-
tyczj over 10 yearssince you are using v2 this
<uses-library android:name="com.google.android.maps"/>
is not needed -
erik over 10 yearsyeah, i know, i added that because i was at my wits end.. but that shouldn't effect the authorization
-
-
Adam S over 10 yearsAnecdotally, this works in reverse too. That is, install with a good API key, swap it out for a bad one, and the 'good' value stays cached until uninstall.
-
umesh over 10 years@erik: thanks, i also had the same problem, unistallation fixed it.