在测试android httpconnection时,遇到一个问题,就是connection.getOutputStream报错。

两个可能的原因;

1.connection的ip地址不对,服务器的IP地址要写对

Android开发,,connection.getOutputStream()报错。

2. 网络请求应该写在子线程中,即

new Thread(){

      public void Runnable(){

             /**将请求部分写在此处即可*/

}

}

Android开发,,connection.getOutputStream()报错。

 

相关文章:

  • 2021-12-14
  • 2021-04-10
  • 2021-05-16
  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-04-21
  • 2022-12-23
  • 2021-07-21
  • 2021-08-05
  • 2021-08-06
  • 2022-12-23
相关资源
相似解决方案