嗨我沒有得到迴應Android 2.2
版本,但完美的工作4.0 version
。HTTP post在json Android2.2版本中沒有得到響應?
我的代碼如下:
HttpPost method = new HttpPost(url);
UrlEncodedFormEntity urlEncodedFormEntity = new UrlEncodedFormEntity(nameValuePairs);
System.out.println("**************Request=>"+urlEncodedFormEntity.toString());
method.setEntity(urlEncodedFormEntity);
HttpResponse response = executeMethod(method);
HttpEntity entity = response.getEntity();
if(entity!=null) {
String value = EntityUtils.toString(entity);
Log.i("", "Meesage"+value);
}
String responseStr = EntityUtils.toString(response.getEntity())
在運行2.2版本,我得到這個類型的日誌貓的消息
04-01 11:41:12.101: W/KeyCharacterMap(13719): Can't open keycharmap file
04-01 11:41:12.101: W/KeyCharacterMap(13719): Error loading keycharmap file '/system/usr/keychars/sec_touchscreen_.kcm.bin'. hw.keyboards.65538.devname='sec_touchscreen '
04-01 11:41:12.101: W/KeyCharacterMap(13719): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
請給我的解決方案?
PLZ後相關logcat的結果,並確保您使用的後臺線程製作httpprequest從主UI線程 –
該錯誤無關,與HTTP請求。問題是在別處 –
你有任何答覆或不?你調試你的代碼? –