我这样做了:
doInBackground(String... prams){
Toast.makeText(getApplicationContext(),
"Server too busy. Please try after sometime.",
Toast.LENGTH_LONG).show();}
获取错误。请帮忙。
答案 0 :(得分:1)
您无法在doInBackground中更新UI。请执行此操作以显示吐司
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(getApplicationContext(),
"Server too busy. Please try after sometime.",
Toast.LENGTH_LONG).show();
}
});
它将解决您的问题
答案 1 :(得分:1)