JAVA
文章平均质量分 52
randor
技术可以解决一切问题
展开
-
HttpPost发送JSON数据中文乱码问题。
Android移动终端通过 HttpPost发送JSON数据时出现中文乱码问题的解决方案。通常都用UTF-8 编码。 1、客户端 postData为JSON数据JSONObject. 注意点:发送和接收时转码。 public static String httpPostData(String uri, int requestTimeOut, String postData) {原创 2013-03-07 15:05:40 · 1485 阅读 · 0 评论 -
Exception in thread "main" java.lang.RuntimeException: Stub!
移动开发时 碰到此错误:Exception in thread "main" java.lang.RuntimeException: Stub!起因:Android开发时,想执行类中的main()方法。原因:当你导入了Android的SDK时,程序入口优先为Android的Activity.解决办法:1、选中项目,右键 -> Run As -> Run Configurations原创 2013-03-08 11:20:54 · 5965 阅读 · 0 评论