getFromLocationName error, Service not available. Have been working, stopped

喜你入骨 提交于 2020-01-01 09:21:43

问题


In my app I am using the getFromLocationName, and it has been working in the app until recently, now all of a sudden I am getting is "Service not available".

The exception says: Geocoder.getFromLocationName(Geocoder.java:178)

This is the code I am using:

 Geocoder coder = new Geocoder(this);
 List<Address> address = null;
 try {
    address = coder.getFromLocationName(navAddr,5);
 } catch (IOException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
 }

To be honest I do not know if has stopped working after I have switched to release build.

I hope someone can point me to what I can do to fix this.


回答1:


I have the excact same problem. I have two apps there has been working perfectly for a while, but stopped working today. What is weird is that in three phones it's not working (2.2, 4.0 and 4.1) but in android 2.1 there's no problem.

There seems to be a problem with the Google Maps Geocoder service, and not our use of the service.

Edit: I just found out that you just have to restart your phone.



来源:https://stackoverflow.com/questions/13711892/getfromlocationname-error-service-not-available-have-been-working-stopped

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!