简体   繁体   English

Android中的连接拒绝错误

[英]Connection refused error in Android

I was running my application fine.There were some changes in the network,like my router and internet connection got changed.Suddenly in the LogCat,I see an error like connection refused.I have provided the static IP still I get the same error. 我的应用程序运行良好。网络中发生了一些变化,例如路由器和互联网连接发生了变化。突然在LogCat中,我看到了诸如拒绝连接的错误。我提供的静态IP仍然出现相同的错误。

I am running my server on my laptop and the app on the device. 我在笔记本电脑上运行服务器,在设备上运行应用程序。 Intially I was able to access the application through the app and also through the browser.Can you guide me and does my Android device needs a new setting that I am missing? 最初,我能够通过该应用程序以及通过浏览器访问该应用程序。您能指导我吗,我的Android设备是否需要我缺少的新设置?

Definitely, you faced some networking problem. 当然,您遇到了一些网络问题。 So, the diagnostic is the same as for any connected device. 因此,诊断与任何连接的设备相同。

  1. check local Android firewall - try to connect to some another server, like facebook.com or google.com 检查本地Android防火墙-尝试连接到其他服务器,例如facebook.com或google.com
  2. check your laptop firewall settings 检查您的笔记本电脑防火墙设置
  3. draw your network schematic carefully and think what should be working and how 仔细绘制您的网络原理图,然后思考应该做什么以及如何工作
  4. try tcpdump\\wireshark to see what's actually going on the wire 尝试tcpdump \\ wireshark看看实际发生的事情

Hope you win! 希望你赢了!

好吧,静态IP不能确定为什么以前不起作用,可能是因为我仅对笔记本电脑使用LAN连接,而不对笔记本电脑和android设备使用相同的WIFI连接。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM