我需要在 android 中的 Asynctask
中显示 Alertdialog
,但它不会在抛出异常时显示。
05-13 14:59:35.522: WARN/System.err(1179): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
谢谢。
最佳答案
无法从后台线程操作 UI。为此使用处理程序或 AsyncTask 的 onPre/Post 方法。
关于android - android中asynctask中的警报对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5990143/