2

I followed the all the steps in google and got the API KEY. But still I get this error. Device displays empty grid view.

 W/System.err(18012): IOException processing: 26 
W/System.err(18012): java.io.IOException: Server returned: 3
W/System.err(18012): at
android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(B    aseTileRequest.java:115) 
W/System.err(18012): at    android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResp    onseData(MapService.java:1473) 
W/System.err(18012): at    android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.proc    essDataRequest(DataRequestDispatcher.java:1117) 
W/System.err(18012): at    android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serv    iceRequests(DataRequestDispatcher.java:994) 
W/System.err(18012): at    android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$Disp    atcherServer.run(DataRequestDispatcher.java:1702)
W/System.err(18012): at java.lang.Thread.run(Thread.java:856) 

Below is how I generated the SHA1 key.

C:\Documents and Settings\user>keytool -list -v -keystore "C:\Documents and
Settings\user\.android\debug.keystore" -alias androiddebugkey -storepass and
roid -keypass android 
Alias name: androiddebugkey 
Creation date: Aug 20, 2013 
Entry type: PrivateKeyEntry 
Certificate chain length: 1 
Certificate[1]: 
Owner: CN=Android Debug, O=Android, C=US 
Issuer: CN=Android Debug, O=Android, C=US 
Serial number: 1db18033 
Valid from: Tue Aug 20 14:50:55 SGT 2013 until: Thu Aug 13 14:50:55 SGT 2043 
Certificate fingerprints: 
     MD5:  85:71:83:F5:CB:82:55:A3:FF:C2:B0:6D:44:5F:95:C4 
     SHA1: A4:18:42:37:D2:2C:44:D3:01:C8:F4:C4:F2:8E:0A:78:3A:0B:9A:C4 
     Signature algorithm name: SHA256withRSA 
     Version: 3 

Extensions: 
#1: ObjectId: 2.5.29.14 Criticality=false 
SubjectKeyIdentifier [ 
KeyIdentifier [
0000: B1 11 13 61 8B 56 27 1C   C1 4F 15 B7 4A E0 FB 2C  ...a.V'..O..J..,
0010: 47 CD 81 82                                        G...
]
]

I add the key to AndroidManifest.xml below.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.comp.android.framework.service"
android:versionCode="1"
android:versionName="1.0" >
<permission
    android:name="com.comp.android.
framework.service.gis.activty.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_MOCK_LOCATION" />
<uses-permission android:name="com.comp.android.framework.service.gis.activty.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

<uses-feature android:glEsVersion="0x00020000" android:required="true"/>

<uses-sdk
    android:minSdkVersion="16"
    android:targetSdkVersion="18" />

<instrumentation
    android:name="android.test.InstrumentationTestRunner"
    android:label="LocationTracker"
    android:targetPackage="com.comp.android.framework.service" >
</instrumentation>

<application
    android:allowBackup="false"
    android:icon="@drawable/ic_launcher" >
    <uses-library android:name="com.google.android.maps" />
    <meta-data    android:name="com.google.android.maps.v2.API_KEY"
android:value="AIzaSyC0ysmCRlgo3Y20-yQCTb6qJ-xZ4GZ5LIc"/>

    <activity
        android:name="com.comp.android.framework.service.gis.activity.AndroidMapActivity"
        android:label="@string/title_activity_android_map" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity> 

</application>

</manifest>

Also Google API KEY added to main.xml

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="fill_parent">
<com.google.android.maps.MapView android:id="@+id/mapview" 
android:layout_width="fill_parent" android:layout_height="fill_parent" 
android:enabled="true" android:clickable="true" android:apiKey="AIzaSyC0ysmCRlgo3Y20-yQCTb6qJ-xZ4GZ5LIc" /> 
</LinearLayout>



I Tried in google but everywhere it says the API key is the problem. But I followed the steps properly. I see only a grid on the device. How can I isolate where the issue is? It doesn't say even the key is wrong by google. It should at least connect to google and should validate the key.

user2771655
  • 1,052
  • 3
  • 20
  • 38
  • are you checking on device or emulator??If you are doing on emulator then is it google api emulator?? – surhidamatya Oct 23 '13 at 03:31
  • This is in real device. Samsumg Galaxy S4. – user2771655 Oct 23 '13 at 03:35
  • Check this link once http://stackoverflow.com/questions/11157029/google-map-in-android-display-only-grid?rq=1 and also this link might be helpful http://www.androidhive.info/2012/01/android-working-with-google-maps/ – surhidamatya Oct 23 '13 at 03:38
  • If you are using google map version2 then go through this link http://www.androidhive.info/2013/08/android-working-with-google-maps-v2/ might be helpfull too. – surhidamatya Oct 23 '13 at 03:43
  • @sur007, in second comment second link is not valid now as now we have to use v2. with SHA1. But in first link I don't understand the comment "If you have used debug.keystore to get api key for map then it will not show map tiles when you launching signed the app with your own private keystore. Have you signed your app ? To work map in signed app you must get api key from google using same keystore that you have used to sign the app(not debug.keystore)." I use debug.keystore to generate the SHA1 key. – user2771655 Oct 23 '13 at 03:51
  • Can you once go through link in mine 3rd comment might it will be helpfull to you.Can you check this link http://stackoverflow.com/questions/7296467/google-map-signed-api-key-errors-in-android – surhidamatya Oct 23 '13 at 03:57
  • 1
    @Sur007, Thanks a million, I was able to get the map. I had to add google play service lib. and also in main.xml I changed from LinearLayout to RelativeLayout. And follow the steps in tutorial you gave. – user2771655 Oct 23 '13 at 05:36
  • You are welcome. Glad that i could help you. Why don't you post your solution as an answer. It could help other people too. – surhidamatya Oct 23 '13 at 06:42
  • I will for sure, still I have problem because I used MapView but in v2 it use MapFragment. So I am still struggling how to fix the gap. Do you know can we use MapView instead MapFragment ? – user2771655 Oct 23 '13 at 06:55
  • Sorry Friend i haven't worked with gmap v2 – surhidamatya Oct 23 '13 at 07:05

0 Answers0