Android – Google maps apiv2 authentication failed
Error:
08-15 12:59:17.435: E/Google Maps Android API(14665): Failed to load map. Error contacting Google servers. This is probably an authentication issue (but Could be due to network errors).
Google console:
detailed list:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cefetmGrdctcc.sgtp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<permission
android:name="com.cefetmGrdctcc.sgtp.permission.MAPS_RECEIVE"
android:protectionLevel="signature"/>
<uses-permission android:name="com.cefetmGrdctcc.sgtp.permission.MAPS_RECEIVE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET"/>
<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.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<Meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="Hidden key"/>
<activity
android:name="com.cefetmGrdctcc.sgtp.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
Layout of map controls:
<fragment
android:id="@+id/googlemap"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment" />
I have imported the Google play service into my project and marked it in the Google API console service list "Google Maps API V2", "Google Maps API V3" and "Google Maps Android API V2", but it seems that my map fragment still cannot be authenticated
The map fragment is just a blank gray box in the middle of the screen. Why does this happen to any idea?
resolvent:
Hey, I just had the same problem. I tried everything the document said, but it didn't seem to work
The only useful thing for me is to uninstall and reinstall my application (without even restarting), because obviously, if you make an error in the configuration, the system will cache the failed authentication. Even if you repair your configuration, your map will not work
Therefore, please try to follow the documents and guidelines on configuring Google Maps API on Android, but every time you change the configuration, uninstall and reinstall