android google map 开发中的常见问题及解决(无法获取 google map apiKey 和Couldn't get connection factory client)
来源:互联网 发布:淘宝出售假冒商品扣分 编辑:程序博客网 时间:2024/05/17 23:09
这些天要研究下google map,在开发的过程中遇到了一些问题。在网上找资料发现也有很多朋友也遇到了类似的问题。而且没有确切的解决方案。在这里本人就简要的说说自己遇到的问题和解决方案。
google map的引入,
<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.jercy.android.GoogleMap" android:versionCode="1" android:versionName="1.0" > <!-- 使用权限 ,不可少--><uses-permission android:name="android.permission.INTERNET" /> <uses-sdk android:minSdkVersion="8" /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <!-- 使用Library说明,不可少 --> <uses-library android:name="com.google.android.maps"/> <activity android:label="@string/app_name" android:name=".GoogleMapActivity" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application></manifest>
<RelativeLayout 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:id="@+id/MapView01" android:layout_width="fill_parent" android:layout_height="fill_parent" android:apiKey="0l3YQSTUctypL1EJVBlhjJi4uol-4zK2ZuJB0wg" /></RelativeLayout>
以上这些是最基本的,Library、permission等都必不可少。
下面讲讲我遇到的问题:
1.在http://code.google.com/intl/zh-CN/android/maps-api-signup.html上无法获取 google map API K
解决: 这一般都是自己MD5的原因。
找到默认debug.keystore的路径 打开Eclipse,选择Windows->Preference->Android->Build,这里便是你debug.keystore的路径
在cmd命令下运行如下命令(路径是我本机的路径,各个主机不同,需要改为自己本机的地址): keystore密码默认为:android
由于sdk安装的原因,也有可能得不到MD5的值,得到的是
怎样得到MD5呢?
其实只要在cmd输入如下命令就可以了keytool -list -keystore debug.keystore -v
也就是在后面加上 -v就行了
2.程序出现Couldn't get connection factory client异常
Couldn't get connection factory client的直接原因是连接不上google地图。连不上google 地图的原因很多,但是一般的大家都可以排除,例如权限,是否引入<uses-library android:name="com.google.android.maps"/>这些
如果检查不是这些问题的话,只有一个可能android:apiKey="??????"的问题了
apikey和您的sdk不匹配。
出现apikey和您的sdk不匹配的原因很多。或许你安装了多个sdk,或许你残留了上个sdk的dug.keystory…………
总之只要让您的目前使用的sdk的MD5生成apikey您的googlemap应该就不会出现Couldn't get connection factory client异常
找到您debug.keystore 的更目录:
删除掉除ddms.cfg之外的所有的文件。这个时候也就是删除了所有的虚拟机,再从您目前所使用的sdk下新建立一个虚拟机,再启动这个虚拟机,上述删除的文件也会自己重新建立。尤其是
debug,keystore.这就是你目前版本的sdk所对应的debug.keystore了。从新生成MD5
获取apikey,加入到布局中去。
此时应该就不会有Couldn't get connection factory client的异常了
希望我的解决方案能帮助你。谢谢
转载自http://blog.csdn.net/wanli_smile/article/details/7444762
- android google map 开发中的常见问题及解决(无法获取 google map apiKey 和Couldn't get connection factory client)
- android google map 开发中的常见问题及解决(无法获取 google map apiKey 和Couldn't get connection factory client)
- 开发Android Map程序 如何获取 apikey (Google Map API v2)
- Android Google Map 开发apikey生成方法
- Android Exception MapActivity: Couldn't get connection factory client
- Android调用GoogleMap出现Couldn't get connection factory client
- MapActivity:Couldn't get connection factory client
- google map apikey获取方式及android sdk不能下载问题
- android google map apiKey 相关操作
- android google map apiKey 相关操作
- 申请Android google map的apiKey
- geo commmand , 【Error] MapActivity Couldn't get connection factory client.
- ERROR/MapActivity(258): Couldn't get connection factory client
- 怎样申请 Google Map apiKey
- Android开发中,google map 获取google map密钥
- android google map开发
- android+-+MapView+couldn't+get+connection+from+fatory+client问题
- 【android】google map开发(1)
- Process.Systems.Enterprise.gPROMS.v3.53.Cracked-EAT
- 开通csdn博客
- js中document里的常用函数
- OriginLab.OriginPro.v8.6.SR3.Cracked-EAT
- 报数游戏湖南2011省赛
- android google map 开发中的常见问题及解决(无法获取 google map apiKey 和Couldn't get connection factory client)
- 爱情如江南的青花瓷
- POJ 2153 排名次 水题map
- VS2010中OpenGL环境的配置方法
- skydrive--------微软高质量网盘
- 代码大全学习-34-自注释的代码(Self-Documenting Code)
- hdu 2550 百步穿杨
- 腾讯面试经验
- oracle 10g 标准版数据库日志中ORA-02097 ORA-00439问题