首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

JSON时候出现错误End of input at character 1 of

2012-01-22 
JSON时候出现异常Endofinputatcharacter1of把异常打出来 原因是org.json.JSONException:End of input at c

JSON时候出现异常End of input at character 1 of
把异常打出来 原因是org.json.JSONException:End of input at character 1 of  

不知道各位遇到过没有

我的post请求

httpPost.setEntity(urlEncodedFormEntity);
System.out.println("参数:" + url + ";" + params + ";" + httpPost);
// 异常句
HttpResponse httpResponse = httpClient.execute(httpPost);

httpPost的语句还走,内容都能打出来

但是返回就不走了

在服务器端也看不到我的请求


请问是怎么回事,在线等答案,谢谢咯!

[解决办法]
你是在try网络链接的时候走exception了吧
这是网络造成的。
看看虚拟机跑是否有问题
如果有,那就从代码查起,看看是否忘记在Manifest.xml中加入internet权限了

Java code
<uses-permission android:name="android.permission.INTERNET"></uses-permission> 

热点排行