Php 安卓泄露活动

Php 安卓泄露活动,php,android,mysqli,Php,Android,Mysqli,我正在使用MySQL数据库获取学生信息。我遵循了一个教程,Android泄漏的窗口出现了。下面是调用异步任务并从数据库获取数据的代码 class getallstudents extends AsyncTask<String, String, String> { /** * Before starting background thread Show Progress Dialog * */ @Override

我正在使用MySQL数据库获取学生信息。我遵循了一个教程,Android泄漏的窗口出现了。下面是调用异步任务并从数据库获取数据的代码

class getallstudents extends AsyncTask<String, String, String> {

        /**
         * Before starting background thread Show Progress Dialog
         * */
        @Override
        protected void onPreExecute() {
            super.onPreExecute();
            pDialog = new ProgressDialog(SecondActivity.this);
            pDialog.setMessage("Loading products. Please wait...");
            pDialog.setIndeterminate(false);
            pDialog.setCancelable(false);
            pDialog.show();
        }

        @Override
        protected String doInBackground(String... args) {
            List<NameValuePair> params = new ArrayList<NameValuePair>();
            JSONObject json = jparser.makeHttpRequest("http://127.0.0.1/testphp/get_all_students.php", "GET", params);  
            try {
                String st_id = json.getString(Tag_st_id);
                String st_name = json.getString(Tag_st_name);
                String st_phone = json.getString(Tag_st_phone);
            } catch (JSONException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
            return null;
        }

         protected void onPostExecute(String file_url) {
                // dismiss the dialog after getting all products
                pDialog.dismiss();
                // updating UI from Background Thread
                runOnUiThread(new Runnable() {
                    public void run() {
                        TextView tv2 = (TextView) findViewById(R.id.textView2);
                        tv2.setText(Tag_st_id);
                        TextView tv3 = (TextView) findViewById(R.id.textView3);
                        tv3.setText(Tag_st_name);
                        TextView tv4 = (TextView) findViewById(R.id.textView4);
                        tv4.setText(Tag_st_phone);
                        }
                });

            }
}
}

onPostExecute已在UI线程上运行。没有理由使用runOnUiThread泄漏发生时,您可以发布您的LOGCAT输出吗?我删除了runOnUiThread,它崩溃了这个问题似乎被放弃了,因此我建议关闭它,因为它没有包含足够的信息进行诊断。