Failed to connect to /127.0.0.1:8080(使用retrofit2请求网络的时候出现的问题)
2017-12-16 23:55
405 查看
Failed to connect to /127.0.0.1:8080(使用retrofit2的时候出现的问题)
原因是如果用localhost或者127.0.0.1访问,肯定就是访问到模拟器里了,而不是你的电脑上。
正确做法:
运行——打开cmd——输入ipconfig查看ipv4协议
把地址换成ipv4就可以了,也就是把localhost换成10.19.71.204
原因是如果用localhost或者127.0.0.1访问,肯定就是访问到模拟器里了,而不是你的电脑上。
正确做法:
运行——打开cmd——输入ipconfig查看ipv4协议
把地址换成ipv4就可以了,也就是把localhost换成10.19.71.204
相关文章推荐
- 使用叶神模拟器无法访问本机服务器的问题(报错:java.net.ConnectException: failed to connect to /127.0.0.1 (port 5000) )
- 解决git clone时,出现Failed to connect to 127.0.0.1 port 46759: 拒绝连接的问题
- 解决连接mongoDB出现问题:MongoDB : Failed to connect to 127.0.0.1:27017, reason: errno:61 Connection refused
- 解决nginx访问问题connect() to 127.0.0.1:8080 failed (13: Permission denied) while connecting to upstream,
- Jenkins连接git时出现“Failed to connect to repository : Command ... HEAD" returned status code 128:”的问题解决
- 使用github出了些问题?fatal: unable to access;Failed connect to github.com:8087;
- 使用easyUI的treegrid的时候,出现后台返回数据为空时,treegrid加载了前面请求到的数据到页面上的问题
- 使用ADB命令安装apk出现问题:Failure [INSTALL_FAILED_NO_MATCHING_ABIS:Failed to etract native libraries
- 解决Nginx的connect() to 127.0.0.1:8080 failed (13: Permission denied) while connect
- 解决使用Genymotion下载模拟器时出现 Failed to import OVA file 问题
- 关于使用JSON库的时候,出现[NSCFString JSONValue]: unrecognized selector sent to instance的问题
- 在启动Mongo时我出现了错误:Failed to connect 127.0.0.1:27017,reason:errno:10061由于目标计算机积极拒绝,无法连接
- 使用solr4.9部署到tomcat上出现Context [/solr] startup failed due to previous errors问题以及解决办法
- 【git使用】Failed to connect to 127.0.0.1 port 1080: Connection refused
- 解决Node.js使用MySQL出现connect ECONNREFUSED 127.0.0.1:3306的问题
- jenkins 启动slave,出现com.sun.deploy.net.FailedDownloadException: Unable to load resource: http://127.0.0.1:8080/jnlpJars/remoting.jar
- 在使用rsync时候出现rsync: Failed to exec ssh解决方法
- 关于使用JSON库的时候,出现[NSCFString JSONValue]: unrecognized selector sent to instance的问题
- 解决搭载OpenStack时候出现can't connect to mysql server on 'controller'的问题
- 使用chrome调试ajax加载本地文件的时候出现Failed to load resource: Origin null is not allowed by Access-Control-Allow