“no route to host” on device on getOutputStream() - connected wirelessly
问题 private String urlPost = "http://192.168.1.66:8080/DataCollectionServlet/"; @Override protected void doWakefulWork(Intent intent) { // https://stackoverflow.com/q/14630255/281545 HttpURLConnection connection = null; try { connection = connection(); w("connection"); // allrigt final OutputStream connOutStream = connection.getOutputStream(); w("GEToUTPUTsTREAM"); // I never see this } catch (IOException e) { e.printStackTrace(); // No route to host } finally { if (connection != null) connection