嗨,我正在尝试使用以下代码连接互联网:
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://192.168.0.100/webnet/xyz.php");
String result = null;
InputStream is = null;
StringBuilder sb = null;
HttpResponse response = httpclient.execute(httppost);
我在清单文件上注册了 Internet 权限
我收到了这个错误:
System.err android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1117)
我用 API 8 级测试这个应用程序