java.net.UnknownHostException: Unable to resolve host "xxx": No address associated with hostname
2015-08-25 20:49
1116 查看
I encountered this problem too, reconnecting the WiFi can solve this.
For us ,we can check if the phone can resolve the host to IP when we start application. If it cannot resolve, tell the user to check the WiFi and then exit.
I hope it helps.
在调试的时候发生如下错误:
java.net.UnknownHostException: Unable to resolve host "xxx": No address associated with hostname
原因是从wifi状态下,切换到没有网络的环境下,然后出现了上述的错误。
For us ,we can check if the phone can resolve the host to IP when we start application. If it cannot resolve, tell the user to check the WiFi and then exit.
I hope it helps.
在调试的时候发生如下错误:
java.net.UnknownHostException: Unable to resolve host "xxx": No address associated with hostname
原因是从wifi状态下,切换到没有网络的环境下,然后出现了上述的错误。
相关文章推荐
- java8-25(线程)
- java与js利用隐藏标签传参数
- 气泡,归并,插入,快速,选择排序java实现
- Eclipse提示Found 3 versions of android-support-v4.jar in the dependency list解决方法
- spring & bean
- JAVA基础9(设计模式 单例模式 工厂模式 建造者模式 原型模式)
- java 生产者消费者问题 并发问题的解决
- java框架篇---struts之OGNL详解
- Java Servlet完全教程
- java多线程之三
- 简单原理来介绍java编程之反射
- java综合(二)springmvc与spring整合
- Java并发编程:Lock
- java成员的初始化 --thinking in java学习笔记(三)
- Java(十三)--Set的添加,删除,修改
- HBase总结(十二)Java API 与HBase交互实例
- Java String浅析
- Java通过Mathematica实现人脸识别
- Spring整合quartz实现定时任务
- Java中的HashSet和TreeSet