我可以知道这个http连接有什么问题吗?运行此程序时出现“HTTP 问题”。
public void makeHttpPost(){
try
{
//http post
HttpPost httppost = new HttpPost("http://10.0.2.2/project/login.php");
HttpClient httpclient = new DefaultHttpClient();
httppost.setEntity(new UrlEncodedFormEntity(namevaluepairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
is = entity.getContent();
}
catch(Exception e)
{
Toast.makeText(getBaseContext(),e.toString() ,Toast.LENGTH_LONG).show();
Toast.makeText(getBaseContext(),"HTTP PROBLEM",Toast.LENGTH_LONG).show();
}
}