search

Home  >  Q&A  >  body text

Android 无法获取httpClient的数据?

PHP中文网PHP中文网2773 days ago729

reply all(5)I'll reply

  • PHPz

    PHPz2017-04-17 16:28:48

    Your thread has not been started, what should you do?

    new Thread().start();

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 16:28:48

    Have you caught the exception? Is getNametext() placed in the onCreate() method? Can a real browser access this data?

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 16:28:48

    Why don't you try the data on the Internet? The local data is very ambiguous...
    And this one can't be started with .start()?

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 16:28:48

    Try changing localhost to your IP?

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 16:28:48

    To run thread, you need to add start
    In addition, put a log in it to see if there is an exception

    catch (IOException e) {
      e.printStackTrace();
    }

    reply
    0
  • Cancelreply