开发者

Android google maps not loading?

i have made an application in which i need to load the google maps. For this i am using the Google API 8 in my application.

i have the following code in my xml file:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<com.google.android.maps.MapView
    android:layout_width="fill_parent" android:layout_height="fill_parent"
    android:apiKey=" 0x94IPJOQyNBzKMCfF5ks82SpwcbVab3Ixfk_hQ " android:id="@+id/mapview"
    android:enabled="true"/>
<!--    home key -->
<!--    0x94IPJOQyNBzKMCfF5ks82SpwcbVab3Ixfk_hQ -->
<!--        map key for publishing -->开发者_运维百科
 </LinearLayout>

The above key i have obtained by using the MD5 print of the debug.keystore file.

The error that i am getting in the Logcat is :

07-25 22:52:02.167: ERROR/MapActivity(4784): Couldn't get connection factory client

In the .java file for the maps, i have used an overlay to load a set of co-ordinates. The overlay is visible but the map is not visible. What could be going wrong?

thank you in advance.


i was facing the same problem you have mentioned here.. and i know this is really annoying, There are some important things and steps you must follow to get google maps in you application. ---Make sure that: 1. you got ur API key for google maps is right. 2. you have mentioned INTERNET PERMISSION outside you application tag. 3. you have called google map user library... even then if you are facing the same problem then i guess you are using some proxy server for your internet. and android application and its emulator dont follow that proxy server. you need to set proxy for you application.

  1. Right click on you project in Eclipse.
  2. Go to "Run As> Run Configuration "
  3. go to "Target" tab
  4. there is "Additional Emulator Command Line Option" write your proxy here like this "-http-proxy http://your-proxy:your-port" without double quotes

it works for me... but this is only for android application projects... cant use google maps in browser


Do you have allowed permission for connection to internet? Or you see grid lines?

 <uses-permission
        android:name="android.permission.INTERNET" />

And what I have noticed, you have empty space at the end and beginning of android:key="


There are a couple questions with the same error you are seeing in Logcat:

Couldn't get connection factory client

Couldn't get connection factory client

http://groups.google.com/group/android-developers/browse_thread/thread/94e3d0454612d143?pli=1

They all seem to mention that it is an Google API problem with API versions 8 and 9.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜