本帖最后由 rekym 于 2011-12-24 21:49:22 编辑

解决方案 »

  1.   

     while ((data = br.readLine()) != null) {
                                sb.append(data);
                                count = sb.length();
                                if (length > 0) {
                                    // 如果知道响应的长度,调用publishProgress()更新进度
                                    publishProgress((int) ((count / (float) length) * 100));
                                    Log.v("pb", Long.toString(count));
                                }
                                // 为了在模拟器中清楚地看到进度,让线程休眠100ms
                                // Thread.sleep(100);
                            }
                            return (sb == null ? "" : sb.toString());顶上,,这里数据会重复掉,原来50行,现在是100行