私はAndroid用のアプリケーションを書いています。アプリケーションはサーバーに接続してコメントを取得します。対象のコードは次のとおりです。
BufferedReader input = null;
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://www.domain.com/personal_proj/directorydirectory/file.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
Log.i("TEST","after httpclient.execute()");
HttpEntity entity = response.getEntity();
このコードを HTC Wildfire、HTC Desire Z でテストしたところ、動作しました。このコードを Android 4.0 以降で実行すると、行に到達することはありません
Log.i("TEST","after httpclient.execute()");
、サーバーはリクエストを取得せず、例外をスローしません。
何か案は?