Android调用GoogleMap出现Couldn't get connection factory client

来源:互联网 发布:李炯浩被诱拐事件 知乎 编辑:程序博客网 时间:2024/04/30 08:17
 0
    Android调用GoogleMap出现Couldn't get connection factory client 10
    之前的写的一些调用GoogleMap的小程序,能够正常调用GoogleMap,但是我另外新写的另外一个调用GoogleMap的程序报以下错误,
    11-20 07:21:01.103: E/MapActivity(305): Couldn't get connection factory client
    (备注:都是使用的同样的apiKey)
    请遇到和我相似问题的Android童鞋解答,不胜感激~~~~~~~~~~~~~~~
    Android
    2011年11月21日 09:53
    weihan1314 weihan1314
    10
    0 0 0

        * Comment添加评论
        * 关注(0)

1个答案 按时间排序 按投票排序

0 0

    这是在官方网上的答案,试试看看

    For instructions, read Obtaining a Maps API Key. For the purpose of this tutorial, you should register with the SDK debug certificate, which will only be valid while your application is signed with the debug key (once you sign with your private key, you will need a new API key). When you get your key, insert it for the value of android:apiKey.


    大概是说,调试时候使用的apikey跟最终发布版本时候的apikey是不一样的,而apikey的使用是必须与当前生成app的keystore相匹配的。因此debug模式,需要重新生成apikey。首先找到debug.keystore的位置:


    •
    Windows Vista: C:\Users\<user>\.android\debug.keystore
    •Windows XP: C:\Documents and Settings\<user>\.android\debug.keystore
    •OS X and Linux: ~/.android/debug.keystore调用以下命令生成新的md5:


    $ keytool -list -alias androiddebugkey \ -keystore <path_to_debug_keystore>.keystore \ -storepass android -keypass android
    再到google官方申请apiKey,然后在mapview中,指定使用该apikey即可。

原创粉丝点击