Google maps and Unable to resovle host maps.googleapis.com

匿名 (未验证) 提交于 2019-12-03 09:06:55

问题:

I have a problem with google maps. I try to add poliline from my current position and position from marker. This is code:

I have current location and position from marker and when click to draw polyline I get Unable to resolve host "maps.googleapis.com": No address associated with hostname. And application crash. When start again everything works fine and polyline add to map. Any idea why?

回答1:

I resolve my problem using:

  urlConnection.setReadTimeout(15000 /* milliseconds */);             urlConnection.setConnectTimeout(15000 /* milliseconds */);             urlConnection.setDoInput(true); 


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