如果你想要显示Toast.你必须在UI线程上运行;
例:
Handler handler = new Handler(Looper.getMainLooper()); handler.post(new Runnable() { public void run() { Toast.makeText(getApplicationContext(),Toast.LENGTH_SHORT).show(); } });