cz.msebera.android.httpclient.conn.ConnectTimeoutException: Connect to /192.168.23.1:8080 timed out(Android访问后台一直说链接超时)
明明之前还是可以运行的练习,过段时间却运行不了,一直说访问后台超时,
对于这个问题我整整弄了两天加一个晚上,心酸。。。,上网找了很多但是都解决不了,我就差没有砸电脑了。
首先 :
第一步:Android Studio 的6.0的(api 23) SDK,不再提供(compile 'com.loopj.android:android-async-http:1.4.9')org.apache.http.*(只保留几个类).
所以使用 compile 'com.loopj.android:android-async-http:1.4.9' ,想它跑起来就不要使用6.0的apk啊
第二步:还有这个是最重要的 必须要 关闭电脑的防火墙 ,要不永远都访问不了后台,反正我就被这个防火墙整整弄了两天。。。
01-08 15:20:55.783 29271-29507/zhu.com.printing3 W/System.err: cz.msebera.android.httpclient.conn.ConnectTimeoutException: Connect to /192.168.23.1:8080 timed out
01-08 15:20:55.786 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)
01-08 15:20:55.786 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:157)
01-08 15:20:55.787 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.conn.scheme.SchemeSocketFactoryAdaptor.connectSocket(SchemeSocketFactoryAdaptor.java:65)
01-08 15:20:55.787 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)
01-08 15:20:55.787 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:145)
01-08 15:20:55.788 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:131)
01-08 15:20:55.788 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
01-08 15:20:55.788 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
01-08 15:20:55.788 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:860)
01-08 15:20:55.789 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
01-08 15:20:55.789 29271-29507/zhu.com.printing3 W/System.err: at com.loopj.android.http.AsyncHttpRequest.makeRequest(AsyncHttpRequest.java:146)
01-08 15:20:55.789 29271-29507/zhu.com.printing3 W/System.err: at com.loopj.android.http.AsyncHttpRequest.makeRequestWithRetries(AsyncHttpRequest.java:177)
01-08 15:20:55.797 29271-29507/zhu.com.printing3 W/System.err: at com.loopj.android.http.AsyncHttpRequest.run(AsyncHttpRequest.java:106)
01-08 15:20:55.797 29271-29507/zhu.com.printing3 W/System.err: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
01-08 15:20:55.797 29271-29507/zhu.com.printing3 W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
01-08 15:20:55.797 29271-29507/zhu.com.printing3 W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
01-08 15:20:55.797 29271-29507/zhu.com.printing3 W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
01-08 15:20:55.797 29271-29507/zhu.com.printing3 W/System.err: at java.lang.Thread.run(Thread.java:818)
01-08 15:20:55.800 29271-29507/zhu.com.printing3 W/System.err: cz.msebera.android.httpclient.conn.ConnectTimeoutException: Connect to /192.168.23.1:8080 timed out
01-08 15:20:55.800 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:119)
01-08 15:20:55.800 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:157)
01-08 15:20:55.800 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.conn.scheme.SchemeSocketFactoryAdaptor.connectSocket(SchemeSocketFactoryAdaptor.java:65)
01-08 15:20:55.801 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:177)
01-08 15:20:55.806 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:145)
01-08 15:20:55.806 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:131)
01-08 15:20:55.806 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:611)
01-08 15:20:55.807 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:446)
01-08 15:20:55.807 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.impl.client.AbstractHttpClient.doExecute(AbstractHttpClient.java:860)
01-08 15:20:55.807 29271-29507/zhu.com.printing3 W/System.err: at cz.msebera.android.httpclient.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
01-08 15:20:55.807 29271-29507/zhu.com.printing3 W/System.err: at com.loopj.android.http.AsyncHttpRequest.makeRequest(AsyncHttpRequest.java:146)
01-08 15:20:55.807 29271-29507/zhu.com.printing3 W/System.err: at com.loopj.android.http.AsyncHttpRequest.makeRequestWithRetries(AsyncHttpRequest.java:177)
01-08 15:20:55.808 29271-29507/zhu.com.printing3 W/System.err: at com.loopj.android.http.AsyncHttpRequest.run(AsyncHttpRequest.java:106)
01-08 15:20:55.808 29271-29507/zhu.com.printing3 W/System.err: at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:423)
01-08 15:20:55.808 29271-29507/zhu.com.printing3 W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
01-08 15:20:55.808 29271-29507/zhu.com.printing3 W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
01-08 15:20:55.808 29271-29507/zhu.com.printing3 W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
01-08 15:20:55.808 29271-29507/zhu.com.printing3 W/System.err: at java.lang.Thread.run(Thread.java:818)
01-08 15:20:55.811 29271-29271/zhu.com.printing3 V/JsonHttpRH: response body is null, calling onFailure(Throwable, JSONObject)
01-08 15:20:55.814 29271-29271/zhu.com.printing3 W/JsonHttpRH: onFailure(int, Header[], Throwable, JSONObject) was not overriden, but callback was received
cz.msebera.android.httpclient.conn.ConnectTimeoutException: Connect to /192.168.23.1:8080 timed out(Android访问后台一直说链接超时)的更多相关文章
- 如何用Adb连接Android手机 & unable to connect to 192.168.1.100:5555的原因和解决方法
利用adb来连接手机, 有两种方式: 1, wifi 2, usb. 1. 通过wifi, 利用adb来连接手机. 在pc的cmd中输入命令: adb connect 192.168.1.100 其中 ...
- Get value from agent failed: cannot connect to [[192.168.186.130]:10050]: [113]No route to host
客户端配置zabbix-agent 后,网页端出现Get value from agent failed: cannot connect to [[192.168.186.130]:10050]: [ ...
- git clone https://github.com/istester/ido.git ,确提示“Failed to connect to 192.168.1.22 port 8080: Connection refused” 的解决办法 。
不知道是否有同学遇到如下的问题: p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo } span.s1 { } git clone ...
- Xshell 链接 Could not connect to '192.168.80.129' (port 22): Connection failed
在使用Xshell链接虚拟机VM里面的Linux的时候.链接失败,报 Could not connect to ): Connection failed 解决步骤: 1.重启VM.Linux.Xshe ...
- 解决Zabbix网页端Get value error: cannot connect to [[192.168.238.139]:10050]: [113] No route to host问题
在安装配置完zabbix_agentd以后,网页端出现 Get value error: cannot connect to [[192.168.238.139]:10050]: [113] No ...
- loadrunner:Action.c(4): Error -27796: Failed to connect to server "192.168.66.3:8080": [10060] Connection timed out
Action.c(4): Error -27796: Failed to connect to server "192.168.66.3:8080": [10060] Connec ...
- adb connect 192.168.1.10 failed to connect to 192.168.1.10:5555
adb connect 192.168.1.10 输出 failed to connect to 关闭安卓端Wi-Fi,重新打开连接即可
- Could not connect to '192.168.89.144' (port 22)
xshell连接linux主机时,会出现错误:Could not connect to '192.168.89.144' (port 22): Connection failed. 但是这时能ping ...
- Bind 远程连接出现rndc: connect failed: 192.168.1.66#953: connection refused
远程连接IP地址为192.168.1.66的BIND DNS服务器,出现 rndc: connect failed: 192.168.1.66#953: connection refused 原因:1 ...
随机推荐
- Compile OpenCASCADE7.3 with VS2008
Compile OpenCASCADE7.3 with VS2008 eryar@163.com 概述 在OpenCASCADE的源码文件夹中有个adm文件夹,里面提供了各个平台中编译源码的项目文件. ...
- WAF——针对Web应用发起的攻击,包括但不限于以下攻击类型:SQL注入、XSS跨站、Webshell上传、命令注入、非法HTTP协议请求、非授权文件访问等
核心概念 WAF Web应用防火墙(Web Application Firewall),简称WAF. Web攻击 针对Web应用发起的攻击,包括但不限于以下攻击类型:SQL注入.XSS跨站.Websh ...
- php7安装memcache 和 memcached 扩展
php7安装memcache 和 memcached 扩展 标签(空格分隔): php memcache和memcached区别 memcache:http://pecl.php.net/packag ...
- 什么是MySQL?(一)
课程大纲 第一章:初识MySQL 1.1什么是MySQL? 1.2如何安装MySQL? 1.3如何配置MySQL? 1.4如何启动和关闭MySQL? 1.5MySQL的登录和退出 1.6如何 ...
- 我照着NancyFx官网的demo来做为什么会有错误呢????
我照着NancyFx官网的demo来做为什么会有错误呢???? >> csharp这个答案描述的挺清楚的:http://www.goodpm.net/postreply/csharp/10 ...
- webService接口发布失败问题
今天在原有工程上新增加了个webService接口的服务类,但是总提示 axis2 出错 File "/axis2-web/listSingleService.jsp" not f ...
- UI Framework-1: Aura Views
Views Views is a user interface framework built on a type called, confusingly, View. Responsible for ...
- vue项目的一些最佳实践提炼和经验总结
项目组织结构 ajax数据请求的封装和api接口的模块化管理 第三方库按需加载 利用less的深度选择器优雅覆盖当前页面UI库组件的样式 webpack实时打包进度 vue组件中选项的顺序 路由的懒加 ...
- bzoj1612 Usaco08 Jan 牛大赛
水题模拟 建一个图,每两个牛进行比赛就连一条边,然后两遍dfs求出比他弱和比他强的牛,最后如果相加数量等于n,说明他能与全部的牛进行比较,排名确定. #include<bits/stdc++.h ...
- POJ 3630 Phone List(字典树)
题意 题意:t个case(1<=t<=40),给你n个电话号码(电话号码长度<10)(1 ≤ n ≤ 10000),如果有电话号码是另一个电话号码的前缀,则称这个通讯录是不相容的,判 ...