java.net.SocketTimeoutException: failed to connect to /10.0..2.2 (port 8080) after 10000ms
来源:互联网 发布:华为数据库开发工程师 编辑:程序博客网 时间:2024/06/05 17:41
今天上午遇到一个问题,使用eclipse的genymotion模拟器模拟Android手机,访问本机的网页(自己用tomcat发布的一个servlet)时,一直出现这个错误:
异常类型: java.net.SocketTimeoutException: failed to connect to /10.0.2.2 (port 8080) after 10000ms
各种百度后,终于在CSDN上看到一个大牛,他说要把10.0.2.2改成自己的IP地址。我就死马当活马医地试了一下,结果真行了!
解决方法: 获取本机IP的方法:在dos窗口输入ipconfig,找到IP地址
最后,修改代码中的URL地址,运行成功,心情高兴极了~!
1 0
- java.net.SocketTimeoutException: failed to connect to /10.0..2.2 (port 8080) after 10000ms
- java.net.SocketTimeoutException: failed to connect to /10.0..2.2 (port 8080) after 10000ms
- java.net.SocketTimeoutException: failed to connect to /10.0.2.2 (port 8080) after 10000ms
- java.net.SocketTimeoutException: failed to connect to /192.168.1.233 (port 8080) after 10000ms
- java.net.SocketTimeoutException: failed to connect to /192.168.56.1 (port 8080) after 5000ms
- Android| failed to connect to /10.0.2.2 (port 80) after 10000ms
- java.net.SocketTimeoutException: failed to connect
- failed to connect to /127.0.0.1 (port 80) after 10000ms: isConnected failed: ECONNREFUSED (Connectio
- Retrofit﹕ java.net.SocketTimeoutException: failed to connect to /IPXXXXXXX
- Android模拟器访问服务器failed to connect to /(主机服务端ip) (port 8080) after 5000ms
- failed to connect to beauty.moreunion.com/47.93.20.43 (port 80) after 15000ms
- Ftp4j 报错failed to connect to /127.0.0.1 (port 3883) after 90000ms: isConnected failed: ECONNREFUSED
- java.lang.AssertionError: java.net.SocketTimeoutException: failed to connect to /192.168.1.5 (por
- java.net.ConnectException: failed to connect to /127.0.1.1 (port 8080)的解决办法
- android-java.net.ConnectException: failed to connect to localhost/127.0.0.1 (port 8080)解决方法
- android-java.net.ConnectException: failed to connect to localhost/127.0.0.1 (port 8080)解决方法
- ContentValues: onError :failed to connect to /169.254.1**.2** (port 8080) after
- Unable to connect to host localhost on port 7055 after 45000 ms
- Android Wear开发浅析(一)
- 自定义Adapter
- 多选下拉列表
- egret鼠标变小手实现思路
- java 获取本机的公网、外网ip
- java.net.SocketTimeoutException: failed to connect to /10.0..2.2 (port 8080) after 10000ms
- 日期属于一年中的第几周
- Apache HTTP+Tomcat负载均衡集群
- cxf demo
- MongoDB 语法和mysql语法对比学习
- java中key值可以重复的map:IdentityHashMap
- nginx 配置 php 的 CI 框架的web
- centos crontab不执行疑点
- 【五校联考3day2】C