用java开发一个安卓客户端在线交流APP,是怎么实现添加好友的?求大神帮我看看这段代码。

图片说明private void submit() {
dialog = ProgressDialog.show(this, "提示", "处理中..");
new AsyncTask() {

        @Override
        protected String doInBackground(String... params) {
            String urlString = AppConstant.getUrl(getApplicationContext())
                    + "ServletService";
            Map<String, Object> map = new HashMap<String, Object>();
            map.put("Action", "addfriend");
            map.put("userid1", user.getId());
            map.put("userid2", list.get(row).getId());
            String result = httpHelper.HttpPost(urlString, map);
            return result;
        }

        @Override
        protected void onPostExecute(String result) {
            super.onPostExecute(result);
            dialog.dismiss();
            if (!TextUtils.isEmpty(result)) {
                if (result.trim().equals("1")) {
                    toastUtil.show("添加成功,等待对方验证");
                } else if (result.trim().equals("-1")) {
                    toastUtil.show("你已经添加对方为好友,等待对方审核");
                } else if (result.trim().equals("-2")) {
                    toastUtil.show("对方拒绝你的请求");
                } else if (result.trim().equals("-3")) {
                    toastUtil.show("你们已经是好友");
                }
            } else {
                toastUtil.show("操作失败");
            }
            finish();
        }
    }.execute();
}

//因为安卓模拟器上运行的时候出bug,一点添加好友,就会提示程序已停止运行,然后自动退出,求大神指出哪里出了问题

http://blog.csdn.net/hitlisheng/article/details/9024539

错误是空指针错误,日志提示你在哪出错了,调试看看

看httputil.java中的代码