我试图将 mysql 与 android 连接,但它给我一个错误。 http 连接 java.net.UnknownHostException 中的错误:
下面是我的代码:
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://www.pherma.net84.net/admin/getAllPeopleBornAfter.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
但是 URL 工作正常。请复制并粘贴网址。