Note that there are some explanatory texts on larger screens.

plurals
  1. POGoogle Maps API V2 'Failed to Load Map. Could not contact Google Servers', Even I check permission and keystore
    primarykey
    data
    text
    <p>I follow the <a href="https://developers.google.com/maps/documentation/android/start?hl=zh-CN">guide</a> to create a google map sample, </p> <p>but it always throw following error.</p> <pre><code>E/Google Maps Android API(27821): Failed to load map. Could not contact Google servers. </code></pre> <p>permission READ_GSERVICES and debug and release keystore have been tested. They also can't resolve above problem. Could anyone tell me why it throw that error?</p> <p>Manifest file:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.where.common" android:versionCode="1" android:versionName="1.0" &gt; &lt;uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" /&gt; &lt;permission android:name="com.where.common.permission.MAPS_RECEIVE" android:protectionLevel="signature" /&gt; &lt;uses-permission android:name="com.where.common.permission.MAPS_RECEIVE" /&gt; &lt;uses-permission android:name="android.permission.INTERNET" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /&gt; &lt;uses-permission android:name="android.permission.com.google.android.providers.gsf.permission.READ_GSERVICES" /&gt; &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /&gt; &lt;uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /&gt; &lt;uses-feature android:glEsVersion="0x00020000" android:required="true" /&gt; &lt;application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" &gt; &lt;meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyDawEkMP7gdiB4nOOkXcdUcxSAvm0kfCmI" /&gt; &lt;activity android:name="com.where.common.MainActivity" android:label="@string/app_name" &gt; &lt;intent-filter&gt; &lt;action android:name="android.intent.action.MAIN" /&gt; &lt;category android:name="android.intent.category.LAUNCHER" /&gt; &lt;/intent-filter&gt; &lt;/activity&gt; &lt;/application&gt; &lt;/manifest&gt; </code></pre> <p>Java file:</p> <pre><code>package com.where.common; import android.os.Bundle; import android.app.Activity; import android.view.Menu; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } } </code></pre> <p>View file:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;fragment xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map" android:name="com.google.android.gms.maps.MapFragment" android:layout_width="match_parent" android:layout_height="match_parent" /&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload