android手机做下载文件时,报了如下异常: 
java.net.ConnectException: localhost/127.0.0.1:8080 - Connection refused

模拟器默认把localhost或者127.0.0.1当做本身

在模拟器上可以用10.0.2.2代替127.0.0.1和localhost

android异常: java.net.ConnectException: localhost/127.0.0.1:8080 - Connection refused的更多相关文章

  1. 【android】java.net.ConnectException: localhost/127.0.0.1:8080 - Connection refused

    调试中通过android simulator模拟器链接localhost或者127.0.0.1,因为我在电脑上面建立了apache,我的代码大概就是URL url = new URL(urlStrin ...

  2. [转]android访问网络:java.net.ConnectException: localhost/127.0.0.1:8888 - Connection refused

    这对刚学会向tomcat模拟的本地服务器发送请求的同学非常重要! 转自:http://wing123.iteye.com/blog/1873763 描述:在做注册功能的时候,向本地服务器:127.0. ...

  3. 【MongoDB】 Failed to connect to 127.0.0.1:27017, reason: Connection refused

    由于项目需要,在一台虚拟机上安装了MongoDB,但是在启动的时候,出现如下错误: [root@localhost bin]# ./mongo MongoDB shell version v3.4.0 ...

  4. 解决git Failed to connect to 127.0.0.1 port xxxx: Connection refused

    某天,用git拉取,提交代码的时候出现了git Failed to connect to 127.0.0.1 port xxxx: Connection refused的问题, 开始百度,看了一通.都 ...

  5. Error: client: etcd cluster is unavailable or misconfigured; error #0: dial tcp 127.0.0.1:4001: getsockopt: connection refused

    配置docker网络flannel时,配置etcd的key的时候出现以下错误 Error:  client: etcd cluster is unavailable or misconfigured; ...

  6. Failed to connect to 127.0.0.1 port 1080: Connection refused package 问题解决方法

    错误: fatal: unable to access 'https://github.com/******': Failed to connect to 127.0.0.1 port 1080: C ...

  7. zabbix-Get value from agent failed: cannot connect to [[127.0.0.1]:10050]: [111] Connection refused

    监控zabbix服务端这台服务器,然后显示Get value from agent failed: cannot connect to [[127.0.0.1]:10050]: [111] Conne ...

  8. 我遇到的错误curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused

    今天我用curl命令,无论如何都是出现: curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused 找了很久,不知道 ...

  9. curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused

    今天我用curl命令,无论如何都是出现: curl: (7) Failed to connect to 127.0.0.1 port 1086: Connection refused 找了很久,不知道 ...

随机推荐

  1. sqoop的使用

    1.sqoop的安装 1.1 与hadoop和hive的集成,修改/opt/cdh/sqoop-1.4.5-cdh5.3.6/conf/sqoop-env.sh 文件

  2. NSUserDefaults的使用

    创建一个user defaults方法有多个,最简单得快速创建方法: NSUserDefaults *accountDefaults = [NSUserDefaultsstandardUserDefa ...

  3. FAQ

    1.Baudrare and the speed of Byte. 2. Linux FS and Flash store. 3. SW's Coupling. 4. Protocol and Pro ...

  4. 详解MVC设计模式

    1 MVC介绍 众所周知MVC不是设计模式,是一个比设计模式更大一点的模式,称作设计模式不合理,应该说MVC它是一种软件开发架构模式,它包含了很多的设计模式,最为密切是以下三种:Observer (观 ...

  5. rgb转16进制 简单实现

    function rgbToHex(r, g, b) { return ((r << 16) | (g << 8) | b).toString(16); }

  6. 浅谈一下关于使用css3来制作圆环进度条

    最近PC端项目要做一个这样的页面出来,其他的都很简单,关键在于百分比的圆环效果.我最初打算是直接使用canvas来实现的,因为canvas实现一个圆是很简便的. 下面贴出canvas实现圆环的代码,有 ...

  7. 个人psp

    排球计分程序 1.计划 通过对用户故事估计这个任务需要3~5d天. 2.开发 2.1需求分析 作为一个观众,我希望了解每场比赛的比分,以便了解比赛的情况. 作为一个观众,我希望输入球队名称查询球队比分 ...

  8. 使用SQL语句查询每张表的column name

    exec sp_columns tableName 上面这行代码可以查出该表所有的column,改为sp_pkeys,可以查出该表的主键.但是我如果想只查出column name,select COL ...

  9. 转!!left join on and 与 left join on where的区别

    数据库在通过连接两张或多张表来返回记录时,都会生成一张中间的临时表,然后再将这张临时表返回给用户.       在使用left jion时,on和where条件的区别如下: 1. on条件是在生成临时 ...

  10. js 判断 是否位数字

    isNaN(val) val为数字返回false 不为数字返回truedocument.write(isNaN(123)); document.write(isNaN(-1.23)); documen ...