Failed to load map. Error contacting Google servers. This is probably an authentication issue

搞个google地图,搞了一天,按照官网的一句一句的打,结果没显示出来,运行的时候,logcat里输出这句:

Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors).


后面终于发现了,原来真的是验证的问题,我使用的是打包apk的时候的SHA1 去生成的map key ,所以我在调试的时候直接点击运行于真机设备,是不支持这个key的。解决方法是,把应用打包好,再放到真机上运行,才是可行的。至于测试的时候,就要用系统生成一个default.keystore,再去申请一个key,才能运行于调试环境。希望能帮助到大家

参考于此:http://stackoverflow.com/questions/17667935/failed-to-load-map-error-contacting-google-servers-this-is-probably-an-authent

Solution:

I found the solution!!!

If you use private keystore to apply API_KEY. You cannot upload and install application with eclipse.

You need to upload .apk file to your device by yourself and install it!

Thanks Tarsem and srikanth gr help!!


你可能感兴趣的:(TO,android,map,Google,load,failed,无,map.)