java io ioexception unable to parse response from server geocoder

[亡魂溺海] 提交于 2019-11-29 01:53:13

Finally I got the solution of my problem.

If you try to hit server very frequently(several times in a minute) for getting address from lat,long then you can get this exception.The solutions of this problem can be:

1-Please try to avoid several hits for address in a minute.
2-Run this code on different device.

If you want to run this code on same device then clear your app data(or uninstall your app) and wait for some time.

I had the same problem with my Samsung Galaxy Tab 10.1. I search hours for a solution and nothing helped. To fix issues try following:

Go to Location settings and enable:

1.Use Wireless networks 2.Use GPS satellites

wait for GPS location fix

After this, geocoder server responded. Even when I disabled wireless and GPS Location, server was working. I think geocoder can only be used if you share your location with Google.

My solution was:

Settings > Date & Time > Automatic date & time (Use network-provided time)

My cause of the issue was not having the proper permissions for the geocoder

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

I was getting the same problem. i added this permission

android.permission.WRITE_EXTERNAL_STORAGE

and it worked well.

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