4
임 안드로이드와 MySQL을 연결하려하지만 오류가 발생합니다. HTTP 연결 java.net.UnknownHostException에서 오류 :안드로이드 - 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의 작업을 잘. n 개의 URL을 붙여 넣으십시오.
기기의 인터넷 연결이 제대로 작동합니까? 그리고 AndroidManifest에서 '인터넷'권한을 지정 했습니까? – Floern
이 줄을 제거 httppost.setEntity (new UrlEncodedFormEntity (nameValuePairs)); –
그 작품은 지금 ... 내 나쁜 .... 매니 페스트에 네트워크 권한을 부여하지 않았다. –