1

Possible Duplicate:
Couldn't get connection factory client - fighting with Google Maps

I have a problem with a mapview. I've created a new keystore for my app and gets an correct key of google maps api and my app is signed with my keystore. But the mapview, not works. I am reading many post about it, but i can't solve it

i have some errors:

07-20 18:16:49.066: I/MapActivity(9106): Handling network change notification:CONNECTED
07-20 18:16:49.066: E/MapActivity(9106): Couldn't get connection factory client
07-20 18:16:49.276: W/System.err(9106): IOException processing: 26
07-20 18:16:49.286: W/System.err(9106): java.io.IOException: Server returned: 3
07-20 18:16:49.296: W/System.err(9106):     at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
07-20 18:16:49.296: W/System.err(9106):     at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
07-20 18:16:49.296: W/System.err(9106):     at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
07-20 18:16:49.296: W/System.err(9106):     at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
07-20 18:16:49.296: W/System.err(9106):     at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
07-20 18:16:49.296: W/System.err(9106):     at java.lang.Thread.run(Thread.java:856)

Other times appears the same error but not appears the follow line:

Couldn't get connection factory client 07-20 18:16:49.276:

My mapview.xml:

<com.google.android.maps.MapView
    android:id="@+id/mapa"
    style="@style/mapView"
    android:layout_width="fill_parent"
    android:layout_height="200dip"
    android:apiKey="@string/apikey"
    android:clickable="true" >
</com.google.android.maps.MapView>

manifiest

..............................
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:icon="@drawable/icon"
        android:label="@string/app_name" 
       >
        <uses-library android:name="com.google.android.maps" />
..............................

I'm going crazy looking for the solution, assistance would be greatly appreciated!

thanks in advance!

Community
  • 1
  • 1
romruben
  • 194
  • 3
  • 17
  • does it works in emulator or crashes app ? – MAC Jul 20 '12 at 17:12
  • Did you list your key from the new keystore? The key on the device for the maps must be generated using the key that you sign with. On the emulator, you have to obtain a key using the debug keystore. If you don't get it exactly right, you just get a blank box where you expect the map to be. The directions are here: https://developers.google.com/maps/documentation/android/mapkey – Howard Hodson Jul 20 '12 at 17:35
  • Oh, and one more thing. I always forget to change the XML apiKey to the device key after testing on the emulator. I'm always trying to run the emulator key on the device and vice versa. – Howard Hodson Jul 20 '12 at 17:38
  • maybe you;ve created a wrong api key, could you please paste here a command thay you've used to create it ? – dilix Jul 20 '12 at 17:52
  • Not like I have, but I did. I repeated the process several times and it works correctly. Before I had the keystore in a different folder than /. Android / nose if that will influence something ... Many many thank you very much everyone for your help – romruben Jul 20 '12 at 18:29
  • Are you extending your class to `MapActivity ` instead of `Activity`? – yugidroid Jul 20 '12 at 23:12
  • 1
    I guess your question is duplicated, take a look at [this](http://stackoverflow.com/a/7982578/828728). – yugidroid Jul 20 '12 at 23:14

1 Answers1

0

try to put your Map Key directly to

android:apiKey=""

and you must add your google account on simulator

Setting --> Account&sync --> add account --> google

your simulator must support google api

Enjoy

AITAALI_ABDERRAHMANE
  • 2,499
  • 1
  • 26
  • 31